I have problem with this query:
MERGE INTO qot
USING dual
ON (qot_id = 1023125885)
WHEN MATCHED AND qot_exc_id = 4 THEN UPDATE SET qot_exc_id = 259
WHEN MATCHED AND qot_exc_id = 6 THEN UPDATE SET qot_exc_id = 131;
I’m getting an error: ‘Missing keyword’.
Could someone give me any clue?
Thank you!
Greetings,
r.
I don’t know why you are trying to use MERGE when you only want to update, never insert. You cannot add conditions into the WHEN clause like you are doing – see documentation.
Why not just do this:
If you really need a MERGE then you want something like:
or perhaps: