Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why doesn't this SQL statement work? 2

Status
Not open for further replies.

Zych

IS-IT--Management
Apr 3, 2003
313
US
I am trying to figure out why a certain style of SQL statements are not working in MySQL. I'm not sure if it is because I am using a 3.X (not sure of the exact version) release.

Here is the statement:

SELECT * FROM FL_State_List
WHERE AreaCode NOT IN (SELECT AreaCode FROM FL_AreaCode_List);

The table FL_State_List has a list of customers in Florida.
The table FL_AreaCode_List is a list of all area codes in Florida.

This statement works fine if I take out the Select statement in the where clause and replace it with actual area codes. If it makes any difference I am using MySQL-Front to run the code.

Thanks for any help,

Zych
 
Sub Selects are not supported.

mysql Documentation indicates they will be supported in version 4.>
 
Thanks for the info and the link.

- Zych
 
ps if you really want to do it the subquerie way you can also look at this thread
thread436-695290
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top