For the PO table layout below:
PoNum Part 53831 M1 53831 M1 53832 M1 53833 M2 53831 M2
I need to return that M1 is on two seperate PoNums and M2 is on two PoNums. Any help is greatly appreciated.
Requires Free Membership to View
"Separate" PoNums can be counted using the DISTINCT keyword in the COUNT function:
select Part
, count(distinct PoNum) as PoNums
from PO
group
by Part
Easy when you see it, eh?
This was first published in May 2006
Join the conversationComment
Share
Comments
Results
Contribute to the conversation