sqlブロックは正常に機能します。
select * from aciktan_atama_tercihler LEFT OUTER JOIN (SELECT MIN(t.eklenme_tarihi) as row_id,
t.tcno,
t.hastane_kodu,
t.tercih_sira
FROM aciktan_atama_tercihler t
where t.silindi = '0'
GROUP BY tcno,
hastane_kodu,
tercih_sira) KeepRows ON aciktan_atama_tercihler.eklenme_tarihi = KeepRows.row_id
WHERE KeepRows.row_id IS NULL
and aciktan_atama_tercihler.silindi = '0'
しかし、以下のように削除するように変更すると、「ORA-00933:SQLコマンドが正しく終了していません」というエラーが表示されます。これを解決するにはどうすればよいですか?:
delete from aciktan_atama_tercihler LEFT OUTER JOIN (SELECT MIN(t.eklenme_tarihi) as row_id,
t.tcno,
t.hastane_kodu,
t.tercih_sira
FROM aciktan_atama_tercihler t
where t.silindi = '0'
GROUP BY tcno,
hastane_kodu,
tercih_sira) KeepRows ON aciktan_atama_tercihler.eklenme_tarihi = KeepRows.row_id
WHERE KeepRows.row_id IS NULL
and aciktan_atama_tercihler.silindi = '0'