SaturnSeven
Programmer
I have 2 tables, Orders & Order Details both related by OrderNo field.
Order Table
OrderNo,CustNo,Date,Seller
S001,100,1/8/06,JT
S002,101,10/8/06,LT
S003,100,5/8/06,JT
Order Details Table
OrderNo,Pos,ItemNo,Status
S001,1,ABC,Complete
S001,2,DEF,OS
S002,1,ABC,OS
S002,2,DEF,OS
S003,1,ABC,OS
I am trying to a unique count of ItemNo and a unique count of OrderNo by CustNo Where Status = "OS" like:-
CustNo,Orders,Items
100,2,2
101,1,2
Many thanks
Order Table
OrderNo,CustNo,Date,Seller
S001,100,1/8/06,JT
S002,101,10/8/06,LT
S003,100,5/8/06,JT
Order Details Table
OrderNo,Pos,ItemNo,Status
S001,1,ABC,Complete
S001,2,DEF,OS
S002,1,ABC,OS
S002,2,DEF,OS
S003,1,ABC,OS
I am trying to a unique count of ItemNo and a unique count of OrderNo by CustNo Where Status = "OS" like:-
CustNo,Orders,Items
100,2,2
101,1,2
Many thanks