need help for a simple request

2001-06-06 Thread alexandre Roussel

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 ?

Thank you for your help.



-
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




Re: need help for a simple request

2001-06-06 Thread Rafal Jank

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




Re: need help for a simple request

2001-06-06 Thread MikemickaloBlezien

On Wed, 6 Jun 2001 11:52:14 +0200, alexandre Roussel
[EMAIL PROTECTED]   wrote:

subselects are not currently supported with MySQL.


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 ?

Thank you for your help.



-
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



Mike(mickalo)Blezien

Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225) 686-2002
=
















-
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