Hi
I'm trying to extract data from 2 tables (A and B) with a subquery

A has the fields (ID_person, name)
B has the fields (ID_person,ID_country)

This is my query

select *
from A
where A.id_person IN (select B.id from B where B.ID_country =7)

But I receive a message error.
If I try to run each single query separately they work.
The subquery returns (for example) 1 and if I write

select *
from A
where A.id_person IN (1)

it works.
The strange thing is that if I try to run the subquery with Access or
SQL with SAS it works!
It is a bug?
I wait for your answer.

Thanks
Matteo


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