I have two tables: I have the claim and policy number given. I want to query table a for its check # then using the result I will like to join/get the detail on the second table B for that check#.
Table A
--------------------
|Bank | Check|Claim|Policy|
---------------------------
|01 | dadf |01234|ABC |
---------------------------
|02 | asdf |04434|DEF |
---------------------------
Table B
-------------------------
|Bank | Check|Address |
--------------------------
|01 | dadf |2 Jones St.|
--------------------------
Select B.*
From TableA A
Join TableB B on (A.Bank=B.Bank and A.Check=B.Check)
Where A.Claim = 'xxx' and A.Policy = 'yyy'
This will return data from TableB only