Hello all,
Here's the background:
I have a db with serial numbers and color codes.
Any serial that has the following codes may have a duplicate serial with a different code in the db.
codes: XAB, XAC, XAD
I need the serials that have one of these three codes, but do NOT have a duplicate serial...
Table: tblPRODUCT
Serial Code
1234 XAB
1234 ZAZ
2234 XAB
3234 XAB
3234 XCZ
4234 ZSZ
The serial I need to see in my output is 2234 because it does have code XAB, but it does NOT have a duplicate serial with some other code.
I'm looking for a single SQL query to complete this (nesting/subqueries are fine).
Not sure why my head won't go around this this morning, but it won't and I'm getting myself frustrated...
~Thadeus
Here's the background:
I have a db with serial numbers and color codes.
Any serial that has the following codes may have a duplicate serial with a different code in the db.
codes: XAB, XAC, XAD
I need the serials that have one of these three codes, but do NOT have a duplicate serial...
Table: tblPRODUCT
Serial Code
1234 XAB
1234 ZAZ
2234 XAB
3234 XAB
3234 XCZ
4234 ZSZ
The serial I need to see in my output is 2234 because it does have code XAB, but it does NOT have a duplicate serial with some other code.
I'm looking for a single SQL query to complete this (nesting/subqueries are fine).
Not sure why my head won't go around this this morning, but it won't and I'm getting myself frustrated...
~Thadeus