sql-porting-problem oracle to postgresql with UPDATE/IS NOT NULL

From: "Gau, Hans-Jürgen" <Hans-Juergen(dot)Gau(at)LGN(dot)Niedersachsen(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: sql-porting-problem oracle to postgresql with UPDATE/IS NOT NULL
Date: 2009-07-28 09:58:18
Message-ID: 670F563845D6B34189933C9C7322B4872C0568@LV-MX-00002-V02.LV.ads.niedersachsen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

hello list,
i have some problems with an sql-statement which runs on oracle but not on
postgresql (i want update only if result of SELECT is not empty, the
SELECT-queries are identical):

UPDATE table1 t1
SET (t1.id) =
(SELECT h.id FROM table2 t2,table3 t3, table1 t1
WHERE t3.field = t2.field
AND t2.id = t1.id
AND t1.id <> t3.id)
WHERE
(SELECT h.id FROM table2 t2,table3 t3, table1 t1
WHERE t3.field = t2.field
AND t2.id = t1.id
AND t1.id <> t3.id) IS NOT NULL;

thanks, hans

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Daryl Richter 2009-07-28 12:25:51 Re: sql-porting-problem oracle to postgresql with UPDATE/IS NOT NULL
Previous Message Science 2009-07-27 12:40:28 Re: Bit by "commands ignored until end of transaction block" again