Reply to Re: Dates in a date range

Your name:

Reply:


Posted by Erland Sommarskog on 12/05/12 11:29

--CELKO-- (jcelko212@earthlink.net) writes:
>>> All we know is that Promised Oyster needs is a temporary table of some
sort that gives him all dates in an interval. <<
>
> No. We have experence and have seen this before. This is like a
> doctor who treats every pain with a dose of drugs versus a doctor who
> actually diagnoses the problem and looks for a long-term solution.

And you very much go for the former, I see.

>>> The table with all the dates puts no attributes on the dates, and is
only a help table for some operations. The other table lists only holidays.
<<
>
> Would you also design a schema with a table for male employees and one
> for female employees? That wouild be splitting the entit on the gender
> attribute. The holidays and non-holidays are still days. The holiday
> attribute can change by decree or by definition (Easter, Chinese New
> Years or other lunar-solar calendar holidays). Nobody can stop time or
> skip a day.
>
> As a simple test, when you have a printed calendar, do you put the
> holidays on the pages of the calendar or on a separate piece of paper
> on the other side fo the room? Can a holiday exist without a date
> (ii.e. Can I put Christmas in a bottle by itself and pull it out as
> needed)?

Oh, you still don't get it! Here you come with canned responses
about calendar tables, and then you cannot model them properly. So,
OK, the proper definition depends on the business needs. And,
no, this have nothing to do whether there it is a sparse table with
only the holidays, or if all days of the year is in table. It's another
issue that makes it impossible for me to have the holidays in the
same table that has a single row for each day from 1990-01-01 to
2149-12-31. Try to use a little imagination, it's not difficult at
all!


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация