Syntax Error going from MS SQL to Progress 10.2B - Forum - DataDirect Connect - Progress Community

Syntax Error going from MS SQL to Progress 10.2B

 Forum

Syntax Error going from MS SQL to Progress 10.2B

  • I have an insert setup from MS SQL to Progress 10.2B but I am getting an error when I try to do a WHERE NOT EXISTS. Is there a different syntax that needs to be written? INSERT INTO PUB.test ("p1m0-prov-no", "p1m0-prov-lst-nm", "p1m0-prov-str-nm", "p1m0-prov-city", "p1m0-prov-st", "p1m0-prov-zpcd", "p1m0-pprov-locd", "prov-name", "p1m0-prov-cnty-cd", "p1m0-prov-sobra-flg", "p1m0-prov-update-0") VALUES (${dea_p1m0_prov_no},${dea_p1m0_prov_lst_nm},${dea_p1m0_prov_str_nm},${dea_p1m0_prov_city},${dea_p1m0_prov_st},${dea_p1m0_prov_zpcd},${dea_p1m0_pprov_locd},${dea_provname},${dea_p1m0_prov_cnty_cd},${dea_p1m0_prov_sobra_flg},${dea_p1m0_prov_update_0}) WHERE NOT EXISTS (SELECT * FROM PUB.test WHERE "p1m0-prov-no" = ${dea_p1m0_prov_no}) Failed to write to database java.sql.SQLException: [DataDirect][OpenEdge JDBC Driver][OpenEdge] Syntax error in SQL statement at or about "WHERE NOT EXISTS
  • Hi,

    This syntax is not supported in OE sql, I quickly tried similar syntax on MS sql and seen similar syntax error:

    insert into t2 values(10,20) where not exists(select * from t1)

    Error: Incorrect syntax near the keyword 'where'. (State:37000, Native Code: 9C)

    HTH

    Santhosh