If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > table data for IN keyword

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-06-03, 18:25
lisa.roney@busi lisa.roney@busi is offline
Registered User
 
Join Date: Feb 2003
Posts: 2
table data for IN keyword

I want a WHERE clause to be something like:
WHERE ID NOT IN ('v1','v2','v3',...) but I want the v1,v2,v3,... to be the result of a select from another table. Is this possible?
Reply With Quote
  #2 (permalink)  
Old 02-07-03, 03:36
Bernd Dulfer Bernd Dulfer is offline
Registered User
 
Join Date: Sep 2002
Location: Germany, near Aachen
Posts: 120
Re: table data for IN keyword

Quote:
I want a WHERE clause to be something like:
WHERE ID NOT IN ('v1','v2','v3',...) but I want the v1,v2,v3,... to be the result of a select from another table. Is this possible?
Depends on your rdbms.

With most you can do this:

select a,b,c
from mytable
where id not in (select id from anothertable)
Reply With Quote
  #3 (permalink)  
Old 02-07-03, 10:16
lisa.roney@busi lisa.roney@busi is offline
Registered User
 
Join Date: Feb 2003
Posts: 2
Talking

That worked! Thank you very much
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On