• Create table ShiftScheduler(emp_code int,Enddate DATETIME,shift INT,shifttype INT)

    INSERT INTO ShiftScheduler VALUES(635,'2014-05-03',2,1)

    INSERT INTO ShiftScheduler VALUES(635,'2014-11-22',2,1)

    INSERT INTO ShiftScheduler VALUES(635,'2015-10-28',1,1)

    Create table emploee(empid INT,shift INT,shifttype INT)

    INSERT INTO emploee VALUES(635,1,1)

    well this looks different from what you previously posted.......

    ShiftScheduler only has an "Enddate".....no "Fromdate"....is this correct?

    emploee (correct spelling?) has no dates at all...is this correct?

    are these "tables" actually views from some other table...and that is why there structure is changing?

    if so, it maybe prudent to give us sight of the master data.

    cheers

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day