RE: SQL problem
Posted in 2004
Bill Dare — — source: Usenet: comp.databases.informix
> -----Original Message-----
> From: xbex17@yahoo.com [SMTP:xbex17@yahoo.com]
> Sent: Monday, November 15, 2004 11:40 AM
> To: informix-list@iiug.org
> Subject: SQL problem
>
> Hi.
> I have problem with update like this ex.
> UPDATE Table1 SET Check='Y'
> WHERE Table1.ID NOT IN (SELECT Table1ID FROM Table2)
[Bill Dare]
Try:
update table1 set check = 'Y"
where not exists (select 1 from table2 where table2.table1id =
table1.id)
Bill
> Problem is very long time of execution when Table2 has milions of records.
>
> Any idea how to solve this?
sending to informix-list