Can I pick several unique in one feild and using dates remove any.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a patients data base (access2000). I would like pull out one patient (
they have unique number) and all their samples . Then I like to remove
duplicate based on a date difference of 15 days. That if the patient has more
than one sample over 15 days I would like to remove them and keep the first
one only. The pateint can have other samples over 15 days and so like those
to be grouped and only one is kept and so on. I hope I made myself clear.

Thanks
 
First determine what the date is of the desired one patient record. suppose
10/18/2004.

The following SQL will delete everything before that date minus 15 days.
Delete * from tablename where patientdate <= #10/18/2004# - 15
 
Back
Top