Determining an Oracle SQL MERGE statement result

Posted by petejamd on Stack Overflow See other posts from Stack Overflow or by petejamd
Published on 2010-06-01T16:49:35Z Indexed on 2010/06/01 16:53 UTC
Read the original article Hit count: 163

Filed under:
|
|

Follow up to this question

This (similar version from old link) works in SQL Server 2008, however, Oracle is giving me trouble:

MERGE INTO wdm_test 
USING ( select '10000000000000000000000000000000' Guid from DUAL ) val
ON ( wdm_test.Guid = val.Guid )
WHEN MATCHED THEN UPDATE SET test_column = null
WHEN NOT MATCHED THEN
 INSERT (Guid, test_column)
 VALUES ('10000000000000000000000000000000', null)
OUTPUT $action;

SQL Error: ORA-00933: SQL command not properly ended

Does Oracle not support OUTPUT $action;? If not, is there an alternative?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about Oracle