I've got a table (UsersOrgs) with two fields, OrgID and UserID. Both type int.
I've got two sql statements:
select OrgID From UsersOrgs Where UserID = @User1
select OrgID From UsersOrgs Where UserID = @User2
Those return a list of OrgID's for each user.
I need a boolean sql statement that will determine if @User1 has at least one OrgID in common with @User2.
@User1's OrgID's: 7,8
@User2's OrgID's: 1,7,9