A
Al
I have a table which has over 250,000 records I have the following situation:
RecordID PatientID MedType DoseDate Frequency Dose
1 004444 A10 iv 7/12/96 6 150
2 004444 A10 iv 7/17/96 6 150
3 004444 A10 iv 9/30/96 6 150
4 004444 A10 iv 10/1/96 6 100
I need to do the following:
if Frequency and Dose are the same per patient, I want to delet these
records of the higher date and leave only the one with the lowest date. In
the example above, RecordID 2 and 3 should be deleted because Freq. and Dose
are the same as 1 but not 1 or 4. the process needs to be automated there is
a lot of records to be done manually. I have used subqueries but they took
forever.
any idea please,
thanks
Al
RecordID PatientID MedType DoseDate Frequency Dose
1 004444 A10 iv 7/12/96 6 150
2 004444 A10 iv 7/17/96 6 150
3 004444 A10 iv 9/30/96 6 150
4 004444 A10 iv 10/1/96 6 100
I need to do the following:
if Frequency and Dose are the same per patient, I want to delet these
records of the higher date and leave only the one with the lowest date. In
the example above, RecordID 2 and 3 should be deleted because Freq. and Dose
are the same as 1 but not 1 or 4. the process needs to be automated there is
a lot of records to be done manually. I have used subqueries but they took
forever.
any idea please,
thanks
Al