63falcondude
Well-known Member
- Joined
- Jan 15, 2016
- Messages
- 3,572
I could have sworn that this code worked a couple of months ago but now I am getting the following error when attempting to run it:
After selecting OK, "WHEN" is highlighted.
Here is the beginning of my code to help put things into perspective:
Does anyone know what is causing this error? I believe this is using ORACLE or PSQL but really don't know. I am a beginner with Access and running queries.
Code:
Syntax error (missing operator) in query expression 'CASE WHEN d.SALESDAT IS NULL THEN ' '
ELSE TO_CHAR(d.SALESDAT,'MM/dd/yyyy')
END'.
After selecting OK, "WHEN" is highlighted.
Here is the beginning of my code to help put things into perspective:
Code:
SELECT
d.PRODID AS Subsidiary_Identifier,
d.PRODID2 AS Machine_Type,
d.SERIALNO AS Mach_NO,
CASE WHEN d.SALESDAT IS NULL
THEN ' '
ELSE TO_CHAR(d.SALESDAT,'MM/dd/yyyy')
END AS Commissioning_Date,
CASE WHEN e.CDSTART IS NULL
THEN ' '
ELSE TO_CHAR(e.CDSTART,'MM/dd/yyyy')
END AS Date_of_Service_Work,
e.NO_INT AS Service_Worksheet_No,
CAST(i.DOMVALMNEMO AS VARCHAR(10)) || ' - ' || ISNULL(h.DESCRLONG,' ') AS Error_Code,
d.ERRTXT AS Error_Reported_by_Customer,
f.ORDTXT AS Error_Reported_work_performed,
ISNULL(j.NO_INT,' ') AS Mat_no_of_offending_component,
a.NO_INT AS Parts_Used,
a.nam AS Description,
e.empliddispo AS TechnicianID
Does anyone know what is causing this error? I believe this is using ORACLE or PSQL but really don't know. I am a beginner with Access and running queries.