这是我写的SQL:
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;
错误:
ORA-00936:缺少表达式
00936. 00000 - “缺少表达”
*原因:
*操作:
缺少什么?谢谢!
答案 0 :(得分:2)
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;