psulions83
Board Regular
- Joined
- Nov 16, 2015
- Messages
- 127
Hi,
I have the following query that runs but gives me too many lines.
I only want it to return the same amount of lines that exist on table C and give me the value for A.AMOUNT with the latest date which is in a column called DATE.
I have the following query that runs but gives me too many lines.
I only want it to return the same amount of lines that exist on table C and give me the value for A.AMOUNT with the latest date which is in a column called DATE.
Code:
SELECT B.BRAND,
C.CONTRACT,
C.CUSTOMER,
A.AMOUNT
FROM Tbl_Price A,
Tbl_Data B,
Tbl_12mth AS C
WHERE A.PRODUCT = B.PRODUCT
AND B.PRODUCT = C.PRODUCT