-1

Im trying to copy data from table1 to table2, but im getting ORA-00933 SQL command not properly ended in Oracle SQL, when i checked in internet i see no errors in my query, can someone help me?

UPDATE table1
SET    field2 = table2.field2,
       field1 = table2.field1
FROM   table2
WHERE  (table2.MSISDN = table1.MSISDN or table2.IMSI = table1.IMSI )and 
(table2.field2 != table1.field2 or table2.field1 != table1.field1);
Edwin Bossman
  • 91
  • 2
  • 10

1 Answers1

0

Try this

UPDATE table1
SET    field2 = table2.field2,
       field1 = table2.field1
FROM   table1
left JOIN table2 
ON (table2.MSISDN = table1.MSISDN or table2.IMSI = table1.IMSI ) 
where table2.field2 is NULL or table2.field1 is null;
Standin.Wolf
  • 1,224
  • 1
  • 10
  • 32