SQL ORA-00936 missing expression error, where is the missing expression?

9.1k views Asked by At

Here is the SQL I wrote:

SELECT j.ticketid
     , j.description AS "JU_DESCRIPTION"
     , j.pgejutype
     , j.status AS "JU_STATUS"
     , w.wonum
     , w.description AS "WO_DESCRIPTION"
     , w.jpnum
     , w.status AS "WO_STATUS"
     , w.actfinish,
FROM maximo.workorder w
LEFT OUTER JOIN maximo.relatedrecord r ON r.recordkey = w.wonum AND r.class = 'WORKORDER' AND r.siteid = w.siteid
LEFT OUTER JOIN maximo.sr j ON r.relatedreckey = j.ticketid
WHERE j.jpnum = 'JUINSP'
AND w.istask = 0;

Error:

ORA-00936: missing expression
00936. 00000 - "missing expression"
*Cause:
*Action:

What is missing? Thank you!

1

There are 1 answers

0
Jeet On
  SELECT j.ticketid
         , j.description AS "JU_DESCRIPTION"
         , j.pgejutype
         , j.status AS "JU_STATUS"
         , w.wonum
         , w.description AS "WO_DESCRIPTION"
         , w.jpnum
         , w.status AS "WO_STATUS"
         , w.actfinish 

(remove the "," here)

FROM maximo.workorder w
LEFT OUTER JOIN maximo.relatedrecord r ON r.recordkey = w.wonum AND r.class = 'WORKORDER' AND r.siteid = w.siteid
LEFT OUTER JOIN maximo.sr j ON r.relatedreckey = j.ticketid
WHERE j.jpnum = 'JUINSP'
AND w.istask = 0;