• select c.DATE, s.eid, isnull(s.Shift,'O'), s.timein, s.timeout

    from Shift s right outer join calendar c on s.date=c.date

    Like this? The "shift" table would be replaced with the table containing "timein" etc


    Dird