I apologize for asking this, because I know I've seen it before but
Google is letting me down.
I have a query that gets a list of zip codes within a certain area.
That works fine. Now how do I get records from another table (users)
that have one of the zip codes from the first result set? If I get 30
zip codes, it would seem inefficient to query the user table 30 times,
once for each zip code.
Can you help? My SQL is rusty to say the least. Naturally this would
be a stored procedure....

Generate results based on another collection of results? (users and zip codes)

I apologize for asking this, because I know I've seen it before but
Google is letting me down.

I have a query that gets a list of zip codes within a certain area.
That works fine. Now how do I get records from another table (users)
that have one of the zip codes from the first result set? If I get 30
zip codes, it would seem inefficient to query the user table 30 times,
once for each zip code.

Can you help? My SQL is rusty to say the least. Naturally this would
be a stored procedure.

"Jeff 'Jones' Putz" <com> wrote in message news:google.com...
I apologize for asking this, because I know I've seen it before but
Google is letting me down.

I have a query that gets a list of zip codes within a certain area.
That works fine. Now how do I get records from another table (users)
that have one of the zip codes from the first result set? If I get 30
zip codes, it would seem inefficient to query the user table 30 times,
once for each zip code.

Can you help? My SQL is rusty to say the least. Naturally this would
be a stored procedure.