|
-
Mar 13th, 2007, 06:45 AM
#1
Thread Starter
PowerPoster
[RESOLVED] select statement to filter one table on another
Suppose I have two tables ...
TABLE A
name type state city
john a tx houston
john b ms jackson
john a ny new york
bill a tx houston
bill b mi grand rapids
bill c ill chicago
al b ms jackson
TABLE B
name address
john 123 new st
bill 456 old st
al 789 mid st
and i want to query all of the table b info that meets certain criteria in table a.
examples:
1) all table b entries where person is assigned the city Houston would return:
name address
john 123 new st
bill 456 old st
1) all table b entries where person is assigned any type b would return:
name address
john 123 new st
bill 456 old s
etc etc for any combination of type city state values.
what would the select statement look like? At first I thought this would be trivial and IVe been playing with Joins but so far am not even close ... any help greatly appreciated!
Last edited by Muddy; Mar 14th, 2007 at 06:38 AM.
Reason: resolved
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|