创建视图时出错

时间:2013-01-02 21:44:09

标签: oracle oracle-sqldeveloper

我正在尝试在Oracle SQL开发人员中创建多个表的视图, 我使用以下查询,但它给了我错误ORA - 00936 MISSING EXPRESSION

请检查我的查询并提供正确的查询;

SELECT A.UNIQUE_ID, A.L1_AU_KEY, A.L1_AU_CD, A.L1_AU_PARENT, A.L1_AU_DESC, A.L1_AU_DESC_ALT, A.L1_AU_SRC_CD, A.L1_AU_CLASS, A.L1_AU_STATUS, A.L1_AU_PERM_FLAG, A.L1_AU_TM_FLAG, A.L1_AU_CV_FLAG, A.L1_AU_SHADOW_FLAG, A.L1_AU_ELIM_FLAG, A.L1_AU_MARKETING_FLAG,
B.L2_DST_KEY, B.L2_DST_CD, B.L2_DST_PARENT, B.L2_DST_DESC, B.L2_DST_DESC_ALT, B.L2_DST_SRC_CD,
C.L3_OFC_KEY, C.L3_OFC_CD, C.L3_OFC_PARENT, C.L3_OFC_DESC, C.L3_OFC_DESC_ALT, C.L3_SLOB_LG, C.L3_SRC_CD,
D.L4_FLEX1_KEY, D.L4_FLEX1_CD, D.L4_FLEX_PARENT, D.L4_FLEX1_DESC, D.L4_FLEX1_DESC_ALT, D.L4_SRC_CD,
E.L5_DIV_KEY, E.L5_DIV_CD, E.L5_DIV_PARENT, E.L5_DIV_DESC, E.L5_DIV_DESC_ALT, E.L5_SRC_CD,
F.L6_FLEX2_KEY, F.L6_FLEX2_CD, F.L6_FLEX2_PARENT, F.L6_FLEX2_DESC, F.L6_FLEX2_DESC_ALT, F.L6_SRC_CD,
G.L7_SUBLOB_KEY, G.L7_SUBLOB_CD, G.L7_SUBLOB_PARENT, G.L7_SUBLOB_DESC, G.L7_SUBLOB_DESC_ALT, G.L7_SLOB_HG, G.L7_SRC_CD,
H.L8_LOB_KEY, L8_LOB_CD, H.L8_LOB_PARENT, H.L8_LOB_DESC, H.L8_LOB_DESC_ALT, H.L8_SRC_CD,
I.L9_OPSEG_KEY, I.L9_OPSEG_CD, I.L9_OPSEG_DESC, I.L9_OPSEG_DESC_ALT, I.L9_SRC_CD,
FROM T_AU_ORBT A 
JOIN T_DST_ORBT B
ON
A.L1_AU_PARENT = B.L2_DST_KEY
JOIN T_OFC_ORBT C
ON
B.L2_DST_PARENT = C.L3_OFC_KEY
JOIN T_FLEX1_ORBT D
ON
C.L3_OFC_PARENT = D.L4_FLEX1_KEY
JOIN T_DIV_ORBT E
ON
D.L4_FLEX1_PARENT = E.L5_DIV_KEY
JOIN T_FLEX2_ORBT F
ON
E.L5_DIV_PARENT = F.L6_FLEX2_KEY
JOIN T_SUBLOB_ORBT G
ON
F.L6_FLEX2_PARENT = G.L7_SUBLOB_KEY
JOIN T_LOB_ORBT H
ON
G.L7_SUBLOB_PARENT = H.L8_LOB_KEY
JOIN T_OPSEG_ORBT I
ON
H.L8_LOB_PARENT = I.L9_OPSEG_KEY;

1 个答案:

答案 0 :(得分:3)

您的选择列表末尾有一个额外的逗号。

EG_KEY, I.L9_OPSEG_CD, I.L9_OPSEG_DESC, I.L9_OPSEG_DESC_ALT, I.L9_SRC_CD, <-- remove this
FROM T_AU_ORBT A

即。用逗号,你会发现错误:

SQL> select dummy, from dual;
select dummy, from dual
              *
ERROR at line 1:
ORA-00936: missing expression