更新したいだけで、挿入したくないのに、なぜMERGEを使おうとしているのかわかりません。実行しているように、WHEN句に条件を追加することはできません。ドキュメントを参照してください。
なぜこれをしないのですか?
update qot
set qot_exc_id = case qot_exc_id
when 4 then 259
when 6 then 131
end
where qot_id = 1023125885
and qot_exc_id in (4,6);
本当にMERGEが必要な場合は、次のようなものが必要です。
MERGE INTO qot
USING dual
ON (qot_id = 1023125885)
WHEN MATCHED THEN
UPDATE SET qot_exc_id = case qot_exc_id
when 4 then 259
when 6 then 131
else qot_exc_id
end;
多分:
MERGE INTO qot
USING dual
ON (qot_id = 1023125885 and qot_exc_id in (4,6))
WHEN MATCHED THEN
UPDATE SET qot_exc_id = case qot_exc_id
when 4 then 259
when 6 then 131
end;