
February 4th, 2013, 11:55 AM
|
|
Registered User
|
|
Join Date: Feb 2013
Posts: 2
Time spent in forums: 40 m 28 sec
Reputation Power: 0
|
|
|
SQL conceptual query help
Hi,
I was wondering if someone could help me with this. Let's say there are two overlapping tables A & B and I want to select a certain data point when it is NOT in the overlapping area. For this example, I will use Person ID. I want to be able to select all Person IDs that are not in both tables. I can do one or the other with:
Select
Person ID
From
Table A
Where
Person ID not in (Select Person ID From Table B Group By 1)
Group by
1
Is there a way to get all of them at once rather than having to write the query both ways? Thanks in advance!
|