alexandre Roussel wrote:
> 
> Hi,
> 
> I have some problems with the following SQL request that I process with phpMyAdmin :
> select * from TABLE2 where FIELD not in (select FIELD from TABLE1);
> 
> This request identify all records in TABLE2 which are not in TABLE1 (depending on 
>value of FIELD).
> TABLE1 and TABLE2 have exactly the same sturcture.
> 
> I currently use MySql 3.22.34 and phpMyAdmin 2.1.0
> 
> What's wrong ?
> 
You cannot use subqueries in MySQL. Try something like this:
select table2.field from table2 left join table1 on (table2.field=table1.field)
where table1.field is null;
-- 
_/        _/  _/_/_/  -----     Rafał Jank [EMAIL PROTECTED]     -----
 _/  _/  _/  _/   _/         Wirtualna Polska SA   http://www.wp.pl 
  _/_/_/_/  _/_/_/    ul. Uphagena 2, 80-237 Gdansk, tel/fax. (58) 5215625
   _/  _/  _/         --------==*  http://szukaj.wp.pl *==----------

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