0

I have a query which works fine in MS SQL Server, but when I run it on Oracle I get the following error:

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

The query is:

UPDATE TABLE1
SET ROW1 = dat.ROW1,
    ROW2 = dat.ROW2,
    ROW3 = dat.ROW3
FROM    TABLE1  AS dest
INNER JOIN  TABLE2  AS dat ON dest.ROW4 = dat.ROW4 AND dest.ROW5 = dat.ROW5 AND dest.ROW6 = dat.ROW6
WHERE   dest.ROW4 = dat.ROW4
        AND dest.ROW5 = dat.ROW5
        AND dest.ROW6 = dat.ROW6
Mat
  • 202,337
  • 40
  • 393
  • 406
NAYSYA
  • 1
  • 1
  • 2
    `ROW!` this should be `ROW1` – Jaydip Jadhav Jan 03 '18 at 08:09
  • sorry. My mistake. It did not work when I wrote it down properly. – NAYSYA Jan 03 '18 at 08:12
  • @HoneyBadger - the question clearly states that the OP has a query which runs on MS SQL Server that they want to run on Oracle too. So why is the tagging wrong? – APC Jan 03 '18 at 08:14
  • 오타가 아니야. 제대로 작성해도 동작하지 않았어. – NAYSYA Jan 03 '18 at 08:15
  • Retracted vote. Sorry, I obviously didn't read the question too well. – HoneyBadger Jan 03 '18 at 08:16
  • 2
    Oracle doesn't support ANSI 92 joins in UPDATE (or DELETE) statements which is a real shame; it would be neat if it did. The question I have linked to shows several workarounds to this problem. – APC Jan 03 '18 at 08:19

0 Answers0