Need help badly

  • Hi,

    I would recommend storing all of the shift information in one table adding a field called shift status (with the possible values of worked, cancelled or open).  If you have to use separate tables, try a UNION query to combine the data from the multiple tables.

    Thanks.

  • Brenna's solution looks to be the way to go.

    As an another alternativ could be a left join approche where you could have the shift table as main table and the worked and cancelled tables as child tables, somethying like this:

    select * from ShiftTable S

    left join ShiftWorkedTable W on S.shift_code = W.shift_code

    left join CanceledShiftTable C on S.shift_code = C.shift_code



    Bye
    Gabor

  • Yes - it all depends on whether there's a shiftID linking those 3 tables - then you can use what Gabor suggested -

    ...though it's still much neater and tidier to just keep all the info in one table instead of deleting from one and adding to another unnecessarily adding to the IO - if you wanted to redesign this you should follow Brenna's suggestion!







    **ASCII stupid question, get a stupid ANSI !!!**

  • Thanks guys I have redesgin it and I am now trying it.

Viewing 4 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply