Reputation: 21
I have a query :
update (select tmp."table1" as tmpid,
del."table1" as delid
from "table1_TMP" tmp ,
"table1_DEL" del
where del."table2" = tmp."table2" and
del."REFSEQNO" = tmp."REFSEQNO")
set tmpid = delid;
This query runs in oracle without any problem.
How can I modify this query to run on Postgresql?
Upvotes: 2
Views: 141
Reputation: 7541
I think this would do it.
update "table1_TMP" tmp
set "table1" = del."table1"
from "table1_DEL" del
where del."table2" = tmp."table2" and
del."REFSEQNO" = tmp."REFSEQNO"
Upvotes: 3