I've had the same problem once.
Reading the manual I found out that MySQL is not SQL conform
and does not support sub-selects.
You'll have to rewrite the statement that you don't need a sub-select
or if not possible create a temporary table.

Regards,
Robert


----- Original Message -----
From: "Bobby Chopra" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 26, 2001 2:09 PM
Subject: Using the IN function


> Probably a simple question:
>
> I am returning back to SQL after a break, and I was sure that I could do
the
> following when using the IN function:
>
> SELECT field1 FROM table1 where field1 NOT IN (SELECT DISTINCT field2 FROM
> table2);
>
> but clearly not.
>
> Could anyone suggest what I am doing wrong, or is this type of statement
not
> valid syntax.
>
> Cheers
>
> Bobby Chopra
> Applications Developer
> ::Source New Media::
>
>
>
> ---------------------------------------------------------------------
> 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