Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 table set up advice

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2008-03-17 : 03:40:44
ok - I have to allow my user to enter in from date - to date (multiple date selections) and these dates will be marked as holiday..
user will also be able to choose a date selection (like march 2-march 5)that was added and remove it from being marked as holiday or add new date selections.

now I need to be able to based on a date lookup whether it is a holiday or not.

what's the best way to set up the table?
should I set it up with fromdates = todates or a table with each individual date and then mark it.

what do you suggest as far as the table set up?

LoztInSpace
Aged Yak Warrior

940 Posts

Posted - 2008-03-17 : 20:16:48
I have always found it easier to have one date per row. If you need it, you can create a view that combines ajacent dates into a from/to.
Go to Top of Page
   

- Advertisement -