I have a SQL problem that has been bugging me, it should be simple but I can't 'quite' get the results im after.
I have 2 tables, Table 1 and Table 2.
Table 1 contains lots of orders, each line is an order (order number, customer number etc) , using DISTINCT, I can return just 1 of each order number, so thats fine.
However, Table 2 contains the customer number AND the customer name etc , so how do I go about returning a customer name (table 2) aswell as the distinct order ID (table 1) (customer number is present in both tables)
I'm very close but I cannot quite get there.
Thanks!
I have 2 tables, Table 1 and Table 2.
Table 1 contains lots of orders, each line is an order (order number, customer number etc) , using DISTINCT, I can return just 1 of each order number, so thats fine.
However, Table 2 contains the customer number AND the customer name etc , so how do I go about returning a customer name (table 2) aswell as the distinct order ID (table 1) (customer number is present in both tables)
I'm very close but I cannot quite get there.
Thanks!