Need assist to find overlaping Dates

JSDART!!

Registered User.
Local time
Today, 18:12
Joined
Mar 12, 2004
Messages
31
Hi
I have a table with the following listed
{ClientId], [Effective Date], [Lapse date],[Contract]

This lists each authorization record for each client.
The info is imported from another system which is not capable of filtering so I bring the data into access to run several queries and reports on the data.

here is the issue there are several thousand clients in this table and some have overlapping auth records. ie. one starts before the other one ends.
I need to write a query that will identify the clients who have overlapping auth records.

Any suggestions would be greatly appreciated.
Thanks
J
 
OK, Just off the top of my head, but how about something like this?
Code:
SELECT T1.ClientID, T1.DateStart as Date1, T2.DateStart as Date2 
  FROM Tbla as T1
       inner join Tbla as T2 on T1.ClientID = T2.ClientID
 WHERE T2.DateStart > T1.DateStart
   AND T2.DateStart < T1.DateEnd
 
Just trying to understand the data in your inported table...

Client A may have Contract B that starts before Contract A (assigned to Client A) end, and this would constitute 2 records in the table.

And i guess you would like to grab all the occurances of this situation?
 
Did the trick

Thanks FOFA
your suggestion did the trick
J
 

Users who are viewing this thread

Back
Top Bottom