有语法错误吗?我需要加入这些列并将其插入表中。 帮帮我
SELECT DISTINCT dept_in_pk.nextval,
REFERENCE_RP_CURRENT.TADIG,
REFERENCE_RP_CURRENT.COUNTRY,
REFERENCE_RP_CURRENT.OPERATOR,
REFERENCE_RP_CURRENT.GSM,
REFERENCE_RP_CURRENT.GPRS,
REFERENCE_RP_CURRENT.CAMEL,
REFERENCE_RP_CURRENT.LTE,
TEST1.MOC_LOCAL_RECORDS
FROM REFERENCE_RP_CURRENT, TEST1
INNER JOIN REFERENCE_RP_CURRENT
ON TEST1.TADIG = REFERENCE_RP_CURRENT.TADIG;
答案 0 :(得分:3)
您在查询中写了两次REFERENCE_RP_CURRENT。请尝试以下方法:
SELECT DISTINCT dept_in_pk.nextval,
REFERENCE_RP_CURRENT.TADIG,
REFERENCE_RP_CURRENT.COUNTRY,
REFERENCE_RP_CURRENT.OPERATOR,
REFERENCE_RP_CURRENT.GSM,
REFERENCE_RP_CURRENT.GPRS,
REFERENCE_RP_CURRENT.CAMEL,
REFERENCE_RP_CURRENT.LTE,
TEST1.MOC_LOCAL_RECORDS
FROM TEST1
INNER JOIN REFERENCE_RP_CURRENT
ON TEST1.TADIG = REFERENCE_RP_CURRENT.TADIG;
答案 1 :(得分:1)
您不应该在REFERENCE_RP_CURRENT
子句中加入FROM
!尝试这样的事情
SELECT DISTINCT dept_in_pk.nextval,
REFERENCE_RP_CURRENT.TADIG,
REFERENCE_RP_CURRENT.COUNTRY,
REFERENCE_RP_CURRENT.OPERATOR,
REFERENCE_RP_CURRENT.GSM,
REFERENCE_RP_CURRENT.GPRS,
REFERENCE_RP_CURRENT.CAMEL,
REFERENCE_RP_CURRENT.LTE,
TEST1.MOC_LOCAL_RECORDS
FROM TEST1
INNER JOIN REFERENCE_RP_CURRENT ON TEST1.TADIG = REFERENCE_RP_CURRENT.TADIG;
在REFERENCE_RP_CURRENT
子句中再次使用该表时,在FROM
子句中包含JOIN
会重复该表中的引用。