Isn't this sort of impossible?
You are asking for something like "a set which contains as an element
the set itself"

        WHERE fooId IN (fooId)

Adolfo

> -----Original Message-----
> From: Peter Abilla [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, December 02, 2002 1:43 PM
> To: [EMAIL PROTECTED]
> Subject: sql:WHERE IN SYNTAX
> 
> 
> Question about SQL "WHERE IN" syntax:
> 
> I know that something like this is fine to do:
> 
> (1)
> SELECT foo 
> FROM   bar
> WHERE  fooID in ('1','2')
> 
> In the example above, the parenthesis includes the itemized 
> fooID's.  But, I want to do a similar thing where instead of 
> the actual fooID's in the WHERE IN clause, I reference a 
> column that contains the fooID's, like:
> 
> (2)
> SELECT foo 
> FROM   bar
> WHERE  fooID in (bar.fooID)
> 
> In this example, I have the table 'bar' and the column 'fooID'.
> 
> Is (2) possible?  If not, what other strategies are there?  
> Please help.
> 
> PSA
> 
> 
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail 
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 
> 
> 
> 


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to