I have two tables as follows:
CUSTOMERS
customernum
customername
ORDERS
ordernum
customernum
partnum
"SELECT customers.customernum, customername, ordernum FROM customers, orders WHERE partnum=123 and customers.customernum=orders.customernum"
I'm trying to pull a recordset of all customers that ordered part #123. The problem is that if a customer ordered three parts, one of which was #123, it's going to pull three records (one record for each . All I want is the single order number for the order that contains this part number.
I would think this would be an easy thing to do, but I'm all out of ideas.
CUSTOMERS
customernum
customername
ORDERS
ordernum
customernum
partnum
"SELECT customers.customernum, customername, ordernum FROM customers, orders WHERE partnum=123 and customers.customernum=orders.customernum"
I'm trying to pull a recordset of all customers that ordered part #123. The problem is that if a customer ordered three parts, one of which was #123, it's going to pull three records (one record for each . All I want is the single order number for the order that contains this part number.
I would think this would be an easy thing to do, but I'm all out of ideas.