kapot
11-09-2003, 05:03 AM
I have a table called TRANSACTION, it has some fields :
REGDATE - date of the transaction
WHAT - a string (NOT UNIQUE)
CUSTOMER - customer code
I want to query all WHAT that the date of the transaction was 15 days before.
So, my sql query is :
SELECT WHAT FROM TRANSACTION WHERE REGDATE < Now() -INTERVAL 15 DAY
But, because of WHAT is not unique, then I could receive some duplicates (customer can send some WHAT in the same REGDATE).
How can I query only the unique WHAT ? I need to list all WHAT (uniquely) that the date transaction was 15 days before.
Please help,
Thanks
REGDATE - date of the transaction
WHAT - a string (NOT UNIQUE)
CUSTOMER - customer code
I want to query all WHAT that the date of the transaction was 15 days before.
So, my sql query is :
SELECT WHAT FROM TRANSACTION WHERE REGDATE < Now() -INTERVAL 15 DAY
But, because of WHAT is not unique, then I could receive some duplicates (customer can send some WHAT in the same REGDATE).
How can I query only the unique WHAT ? I need to list all WHAT (uniquely) that the date transaction was 15 days before.
Please help,
Thanks
