Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Query help

$
0
0

I need ALL records related to Table A returned from Table B where a certain condition on Table B is met along with any other records a person might have as long as 1 of them meet the condition. 

Example.

Select A.Name, B.Hobby From A inner join A on A.pk = B.fk

where Hobby = 'tennis'

So say this would return 1 row, what im asking is to also return any other records the FK table has as well, as long as they have 'tennis'.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>