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 2000 Forums
 SQL Server Development (2000)
 First Day of Year

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-12-21 : 09:50:09
Citynumbers writes "Hi,

How can I state in my SQL query on a MSSQL 2000 server that week one strarts on Monday 2 Januari 2006 (being the Monday of the first full week of the year)?

Can this option be set on server level also so it's standard in every sql query?

Regards Citynumbers.com."

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2005-12-21 : 13:12:33
mmm... you should create a calendar table (or time dimension) - to handle this sort of stuff - Google it.


Duane.
"It's a thankless job, but I've got a lot of Karma to burn off."
Go to Top of Page

Frank Kalis
Constraint Violating Yak Guru

413 Posts

Posted - 2005-12-21 : 16:13:45
...or check out the ISOWeek sample in BOL when you search for CREATE FUNCTION.

--
Frank Kalis
Microsoft SQL Server MVP
http://www.insidesql.de
Heute schon gebloggt? http://www.insidesql.de/blogs
Go to Top of Page
   

- Advertisement -