Unix Technical Forum

RE: SQL problem

This is a discussion on RE: SQL problem within the Informix forums, part of the Database Server Software category; --> > -----Original Message----- > From: xbex17@yahoo.com [SMTP:xbex17@yahoo.com] > Sent: Monday, November 15, 2004 11:40 AM > To: informix-list@iiug.org > ...


Go Back   Unix Technical Forum > Database Server Software > Informix

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 07:05 AM
Bill Dare
 
Posts: n/a
Default RE: SQL problem




> -----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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:26 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com