Here's what I'm trying to do. I have a table with zip codes in them where the zipcodes might be only the first part of the zipcode. eg: instead of listing 90201, 90202, 90203, ..., 90299 the table might just contain 902 to represent all of them.If it contains only full zipcodes, I can issue a query such as:select name, city from contactswhere contacts.zip not in (select zip from zipcodes)
What I want to do is something like the following invalid SQL, but I'm not sure how to properly structure the SQL or even if it's possible to do in a single SQL call without using cursors:select name, city from contactswhere contacts.zip not like (select zip + '%' from zipcodes)
Any pointers on how best to do this?Thank you!