Just took another look at this and noticed that you also missing a closing parenthesis. As per my previous note, you may also need to add the SCHEMA= option. Try the following . . . . proc sql ; connect to oracle(user=rrimal orapw=XXXXXX path=clrabc); execute( merge into clrabc.TEST_DATA A USING (SELECT * FROM clrabc.tEST_DATA_TWO ) B ON (A.ENCOUNTER= B.ENCOUNTER AND A.MEASURE=B.MEASURE ) WHEN MATCHED THEN UPDATE SET A.VALUE = B.VALUE WHEN NOT MATCHED THEN INSERT (A.ENCOUNTER,A.MEASURE,A.VALUE) VALUES (B.ENCOUNTER,B.MEASURE,B.VALUE) ); execute (commit) by oracle; disconnect from oracle; quit;
... View more