該查詢的註釋(/ * * /)部分執行,但是整個查詢在///////部分出現問題。請高手解決此問題。Oracle內嵌視圖查詢
SELECT *
FROM (
/* (SELECT U1.EMAIL, S1.GRNNUM
FROM RDT_USER U1,
(SELECT O.ID, GRNNUM
FROM RDT_ORGANIZATION O,
(SELECT GRNNUM, RECEPIENTCODE, ORGINATORCODE
FROM RDT_GOODSRECEIPTNOTE M
WHERE M.ACTIONSTATUS = 0
AND M.LATEST = 1
AND (SYSDATE - M.GENDATE) >= 0) S
WHERE O.FUCODE = S.ORGINATORCODE) S1
WHERE U1.ORGID = S1.ID)*/ A///////here am getting right paranthesis missing,
(SELECT U.EMAIL, T1.GRNNUM
FROM RDT_USER U,
(SELECT O.ID, GRNNUM
FROM RDT_ORGANIZATION O,
(SELECT GRNNUM, RECEPIENTCODE, ORGINATORCODE
FROM RDT_GOODSRECEIPTNOTE M
WHERE M.ACTIONSTATUS = 0
AND M.LATEST = 1
AND (SYSDATE - M.GENDATE) >= 0) T
WHERE O.FUCODE = T.ORGINATORCODE) T1
WHERE U.ORGID = T1.ID) B)
WHERE A.GRNNUM = B.GRNNUM
你需要一個逗號(',')在'A'之後,你在那裏缺少palenthesis。 –
評論部分實際上被忽略。如果你只是從查詢中刪除它,你會得到同樣的錯誤。你想用'A /////// ...'部分達到什麼目的?記住SQL中的註釋以'--'開頭。另外,弗洛林評論說,如果''''在'select'子句中,則需要用逗號將它與第二個'select'分開。 –
這是沒有評論部分來解釋你我喜歡那.......... – sunleo