July 3, 2005 at 11:37 pm
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.
July 6, 2005 at 9:46 am
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
July 6, 2005 at 2:34 pm
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 !!!**
July 6, 2005 at 4:23 pm
| 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