Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: Need help identifying dates of an occurance after a specific date

    This could help point you in correct direction, regardless of the number of accidents

    CREATE TABLE #tblDrivers (DriverID Int, AccidentDate date)

    INSERT INTO #tblDrivers(DriverID,AccidentDate)

    VALUES (1,'03/01/2012'),

    (1,'05/06/2015'),

    (2,'08/05/2013'),

    (3,'12/01/2011'),

    (4,'06/22/2005'),

    (4,'04/01/2008'),

    (4,'11/21/2010')

    GO

    CREATE TABLE #tblDrivingSchool...

  • RE: Need help identifying dates of an occurance after a specific date

    This could help you...

    CREATE TABLE #tblDrivers (DriverID Int, AccidentDate date)

    INSERT INTO #tblDrivers(DriverID,AccidentDate)

    VALUES (1,'03/01/2012'),

    (1,'05/06/2015'),

    (2,'08/05/2013'),

    (3,'12/01/2011'),

    (4,'06/22/2005'),

    (4,'04/01/2008'),

    (4,'11/21/2010')

    GO

    CREATE TABLE #tblDrivingSchool (DriverID Int, ClassDate date)

    INSERT INTO #tblDrivingSchool (DriverID,ClassDate)

    values

    (1,'03/15/2012'),

    (3,'12/18/2011'),

    (4,'07/10/2005')...

Viewing 2 posts - 1 through 2 (of 2 total)