• Hi All,

    Thank yo so much for your input.

    Below is script for sample data. For the output I need to identify the member number of overlapping records so that the relevant department can correct them.

    The end and start dates cannot be equal, that is the business requirement.

    I don't know where to start, I don't know if I will have to loop through records to be able to identify the blocks by member?

    Thank you all for your help - if there is anything else that I need to supply, please let me know.

    CREATE TABLE [dbo].[zzz_Overlapping](

    [MemNo] [varchar](500) NULL,

    [YMDStart] [datetime] NULL,

    [YMDEnd] [datetime] NULL

    ) ON [PRIMARY]

    GO

    insert into zzz_Overlapping (MemNo,YMDStart,YMDEnd)

    values ( 123,'1997-06-01','1997-09-30')

    insert into zzz_Overlapping (MemNo,YMDStart,YMDEnd)

    values ( 123,'1997-10-01','1997-10-31')

    insert into zzz_Overlapping (MemNo,YMDStart,YMDEnd)

    values ( 123,'1997-11-01','1997-12-31')

    insert into zzz_Overlapping (MemNo,YMDStart,YMDEnd)

    values ( 123,'1998-01-01','1998-12-31')

    insert into zzz_Overlapping (MemNo,YMDStart,YMDEnd)

    values ( 123,'1999-01-01','1999-06-30')

    insert into zzz_Overlapping (MemNo,YMDStart,YMDEnd)

    values ( 417,'2001-06-01','2001-09-30')

    insert into zzz_Overlapping (MemNo,YMDStart,YMDEnd)

    values ( 417,'2001-10-01','2001-09-30')

    insert into zzz_Overlapping (MemNo,YMDStart,YMDEnd)

    values ( 417,'2001-11-01','2001-12-31')

    Michael