Hi all, I'm not sure how to get around this, I was hoping someone
could provide me with some help. Let's take this simple data set of 2
columns in a table:
Tom - id1
Bob - id2
Jane - id1
John - id8
Fred - id2
John - id8
Bob - id1
Using SQL, I'm trying to return the ones that are *not* unique. I
don't really know if Tom is actually id1 or if Jane is. Since they
both share an ID, I want to return them (as the errors!). Since Bob
has 2 different IDs and ID2 can also belong to Fred, I want to return
all of those. (etc). The only one not coming back should be
John-id8, because he's the one with the unique ID (even if he's listed
twice).
These names and IDs are two different columns in the same table, so no
inter-table relationships involved here!
Can anyone possibly offer assistance? Much thanks!
T-McK
could provide me with some help. Let's take this simple data set of 2
columns in a table:
Tom - id1
Bob - id2
Jane - id1
John - id8
Fred - id2
John - id8
Bob - id1
Using SQL, I'm trying to return the ones that are *not* unique. I
don't really know if Tom is actually id1 or if Jane is. Since they
both share an ID, I want to return them (as the errors!). Since Bob
has 2 different IDs and ID2 can also belong to Fred, I want to return
all of those. (etc). The only one not coming back should be
John-id8, because he's the one with the unique ID (even if he's listed
twice).
These names and IDs are two different columns in the same table, so no
inter-table relationships involved here!
Can anyone possibly offer assistance? Much thanks!
T-McK
Comment