
April 21st, 2004, 12:55 PM
|
|
Registered User
|
|
Join Date: Apr 2004
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Join query problem
What I want to do is select everything out of ad_listing that have the same postalcode as what the condition for the postal_codes table depicts ( WHERE postal_codes.Latitude >= 42.6145300852 AND postal_codes.Latitude <= 43.3373659148 AND postal_codes.Longitude >= -82.8767447212 AND postal_codes.Longitude <= -81.8945312788)
This is the query I cam up with, but have not had any luck.
SELECT * FROM ad_listing LEFT JOIN postal_codes ON ad_listing.postalcode=postal_codes.postalcode WHERE postal_codes.Latitude >= 42.6145300852 AND postal_codes.Latitude <= 43.3373659148 AND postal_codes.Longitude >= -82.8767447212 AND postal_codes.Longitude <= -81.8945312788
Any sugestions?
Data Definition:
http://www.trilliandesigns.com/Untitled-1.gif
|