HELP: First Day in Week Setting and First Week in Year Help

HELP: First Day in Week Setting and First Week in Year Help

Post by Gerald Tauchne » Fri, 28 Apr 2000 04:00:00



1.
I would like to change the SQL-Server 7 configuration for
- the first day of week to Monday and NOT Sunday AND
- that the first week in a year is the first full week

I know the configuration option "SET DATEFIRST", but this is only for a
session.

I would like to change these settings ONCE for the whole SQL Server.

2.
Found something interesting:
If I want to fill a table with all weeks from 1997 to 2005 and a unique ID,
sometimes,
weeks are missing (2000-01) for example... This problem starts with 2000...
Y2K Problem?
But this problem only happens, if I set the first day of week to Sunday, if
it is set to Monday, it works!

I am confused... PLEASE HELP!

Here is the code for it:
CREATE TABLE [dbo].[DBL_Dates] (
 [Number] [T_PCID] NOT NULL,
 [Week] VARCHAR(6) NOT NULL
 CONSTRAINT [PK_DBL_Dates] PRIMARY KEY ( [Number] )
) ON [PRIMARY]






SET DATEFIRST 7 -- 7 does NOT work, 1 works





BEGIN

 BEGIN




 END



also... thats why I tried with DAY
END

 
 
 

HELP: First Day in Week Setting and First Week in Year Help

Post by Tibor Karasz » Sat, 29 Apr 2000 04:00:00


Gerald,

1: Sp_configure (default language).

--
Tibor Karaszi, Cornerstone Sweden AB
MCDBA, MCSE, MCSD, MCT, SQL Server MVP
Please reply to the newsgroup only, not by email.


Quote:> 1.
> I would like to change the SQL-Server 7 configuration for
> - the first day of week to Monday and NOT Sunday AND
> - that the first week in a year is the first full week

> I know the configuration option "SET DATEFIRST", but this is only for a
> session.

> I would like to change these settings ONCE for the whole SQL Server.