user1253754
user1253754

Reputation: 21

Oracle query not executing in PostgreSQL

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

Answers (1)

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

Related Questions