You are here: Re: Dates in a date range « MsSQL Server « IT news, forums, messages
Re: Dates in a date range

Posted by Erland Sommarskog on 10/11/05 10:10

PromisedOyster (PromisedOyster@hotmail.com) writes:
> Thanks for your help, but I do not have CREATE TABLE permissions for
> this particular database, hence the request. I only have SELECT
> permission.

So use a table varaible or a temp table.

> Thanks Erland for your assistance on populating the dates table, but
> that seems a very complicated way to do it. I normally stick it in a
> while loop and do a DateAdd. Sure, it might not be efficient but that
> is not an issue

Complicated? Well, if dateadd() is good enough to you, why did you
even bother to ask? :-)

The script uses a table of numbers, which is a common way to solve SQL
problems where you need a range of values.


--
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

 

Navigation:

[Reply to this 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

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