Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

syntax error in merge staement

TinaApr 22 2020 — edited Apr 22 2020

Hi Gurus,

I am getting an error saying missing keyword in the merge statement.

I am just trying to inactivate target if it is not present on source.

Not sure what am I missing here.

Could you please help?

       MERGE INTO target TGT

        USING ( SELECT *

                   FROM source) SRC

        ON ( TGT.ID = SRC.ID )

        WHEN NOT MATCHED THEN

          UPDATE SET TGT.inaative_date  = SYSDATE ;

Comments
Post Details
Added on Apr 22 2020
4 comments
1,280 views