合并/插入声明ORA-911

时间:2015-04-08 02:07:50

标签: flyway

以下语句在迁移时在ORACLE中生成“ORA-00911:无效字符”问题,因为它在AQT / SQL Developer中直接正常工作。

INSERT INTO ss.CODETBL(FIELDNAME,FIELDVALUE,IDS)
SELECT FIELDNAME,FIELDVALUE,IDS FROM
(
SELECT 'ACCT_TYPE_CD' FIELDNAME, '$' FIELDVALUE,'SAMP' IDS FROM DUAL UNION ALL
SELECT 'ACCT_TYPE_CD', 'L','SAMP' FROM DUAL UNION ALL
SELECT 'ACCT_TYPE_CD', 'C','SAMP' FROM DUAL 
)
D
WHERE NOT EXISTS
(
    SELECT 1 FROM SS.CODETBL 
    WHERE D.FIELDNAME = FIELDNAME 
    AND D.FIELDVALUE = FIELDVALUE
    AND D.IDS = IDS
); 

0 个答案:

没有答案