kstahl
asked on
Query to find distinct record
This should be easy.
I have a SQL table with the data as follows:
Part# Rev Status
P123 A O
P123 B A
P123 C O
P123 D O
P124 C A
P127 A O
P128 A O
P128 B A
P129 F O
P130 F A
P134 A O
P134 B O
A=Active Part
O=Obsolete Part
I need to write a query that only pulls the part numbers that are obsolete (no active status regardless of rev).
The correct results would be
P127
P129
P134
I have a SQL table with the data as follows:
Part# Rev Status
P123 A O
P123 B A
P123 C O
P123 D O
P124 C A
P127 A O
P128 A O
P128 B A
P129 F O
P130 F A
P134 A O
P134 B O
A=Active Part
O=Obsolete Part
I need to write a query that only pulls the part numbers that are obsolete (no active status regardless of rev).
The correct results would be
P127
P129
P134
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect....thank you!
Options:
ORDER BY 1
ORDER BY Part#