lpa
MIS
- Jan 30, 2003
- 11
I am trying to refine a select for a report. sample data:
urn status date on staff last status date
2059 A 10/8/1997 <NULL>
2059 T 10/8/1997 1/10/02
1050 T 1/1/1996 9/30/01
I need to select all records where status is 'T' and last status date is greater than 1/1/2000 UNLESS there is another record with the same urn and the status of that record is 'A'
So in my example, my expectation is that only the record for urn 1050 would be returned.
Any suggestions?
thank you.
Paul
urn status date on staff last status date
2059 A 10/8/1997 <NULL>
2059 T 10/8/1997 1/10/02
1050 T 1/1/1996 9/30/01
I need to select all records where status is 'T' and last status date is greater than 1/1/2000 UNLESS there is another record with the same urn and the status of that record is 'A'
So in my example, my expectation is that only the record for urn 1050 would be returned.
Any suggestions?
thank you.
Paul