Hello,
I have looked and looked at all the delete statements on the forum but i am not getting anywhere fast.
I have a table called "tblMaster"
With the following fields that i want to search by
IDNo
DateRequired
DateBooked
In short i want to search the table and delete all duplicates where "IDNo" and "DateRequired" both match.
EG
PS "IDNo" will repeat many times as its a Users ID number so i cant set it to not allow duplicates in the table's design.
IDNo --------------DateRequired --------------DateBooked
32 -----------------04/08/08 -------------------05/08/2008 15:09:00
32 -----------------04/08/08 -------------------05/08/2008 14:00:00
I am looking to delete all duplicates so that all that i left is the one with the first "DateBooked" Time stamp. The delete statement will need to delete the whole entry as there are other fields in it that i have not mentioned above
I have tried to create a delete statement using count >1 for both "IDNo" and "DateRequired" but the query will not run. "Cannot Group on fields marked with *"
HELP!!!
I have looked and looked at all the delete statements on the forum but i am not getting anywhere fast.
I have a table called "tblMaster"
With the following fields that i want to search by
IDNo
DateRequired
DateBooked
In short i want to search the table and delete all duplicates where "IDNo" and "DateRequired" both match.
EG
PS "IDNo" will repeat many times as its a Users ID number so i cant set it to not allow duplicates in the table's design.
IDNo --------------DateRequired --------------DateBooked
32 -----------------04/08/08 -------------------05/08/2008 15:09:00
32 -----------------04/08/08 -------------------05/08/2008 14:00:00
I am looking to delete all duplicates so that all that i left is the one with the first "DateBooked" Time stamp. The delete statement will need to delete the whole entry as there are other fields in it that i have not mentioned above
I have tried to create a delete statement using count >1 for both "IDNo" and "DateRequired" but the query will not run. "Cannot Group on fields marked with *"
HELP!!!
Last edited: