下記SQLでエラーが発生します。
原因が見つけられずに困り果てています。
どなたかご教示ください。
error
1ORA-00933: SQLコマンドが正しく終了されていません。 200933. 00000 - "SQL command not properly ended" 3*Cause: 4*Action: 5行29 列14でエラー
SQL
1SELECT D.FLBX,E.FLMN AS フロア名, 2E.BXMN AS ボックス名, 3(B.RHB||B.CL||B.SZ) AS 品番, 4A.SHNMN AS 商品名, 5G.CLMK AS カラー名, 6H.SZMK AS サイズ名, 7F.SSKMN AS 仕入先名, 8B.SSKSHNC AS メーカー商品コード, 9B.GTNC AS GTINコード, 10A.BRNC AS ブランドコード, 11A.JDI AS 上代, 12(A.ORSTNK * A.ORSTNY) AS 卸価格, 13A.ORSTNY AS 卸単位, 14(TRUNC(C.RZKS/A.ORSTNY) - DECODE(I.HIAMS,'',0,I.HIAMS)) AS EC在庫数 , 15J.KKTH AS EC登録日 16FROM SHNZOK A 17INNER JOIN HNMST B ON (A.RHB = B.RHB) 18INNER JOIN HNZIKMST C ON (B.SHNC = C.SHNC AND B.TRKH = C.TRKH) 19INNER JOIN UIMST D ON (A.RUI = D.RUI) 20INNER JOIN LBXMST E ON (D.FLBX = E.FL || E.BX) 21INNER JOIN SKMST F ON (A.SSKC = F.SSKC) 22INNER JOIN CKkiIraShnDat J ON (A.RHB = J.RHB) 23LEFT JOIN LMST G ON (B.CL = G.CL) 24LEFT JOIN ZMST H ON (B.SZ = H.SZ AND B.SZSYUB = H.SZSYUB) 25LEFT JOIN (SELECT RUI,HIN,CL,SZ,RHBTRKH,SUM(HIAS) AS HIAMS FROM CYYKJSNDAT 26WHERE ((JTIK = '0' AND HIAS <> 0) OR (JTIK = '1')) AND KNRK IS NULL GROUP BY RUI,HIN,CL,SZ,RHBTRKH) I ON (B.SHNC = I.RUI || I.HIN || I.CL || I.SZ) 27WHERE A.RUI IN (SELECT RUI FROM RUIMST WHERE FL IN ('11','12','13','14','15','16','17')) AND TRUNC(C.RZKS/A.ORSTNY) > 0 AND A.ORSTNY > 0 28WHERE J.KKTH = TO_CHAR(SYSDATE-1, 'YYYYMMDD') 29ORDER BY D.FLBX,B.SHNC;
回答1件
あなたの回答
tips
プレビュー