Okay, now I saw the light 🙂 THX - (found more explanation on http://www.kodyaz.com/articles/sql-set-datefirst-scope-permanent-for-sql-server-database.aspx)
* first day in week depends on language of the session
* language of session depends on language of user (login)
* language of user is in most cases default the default language of the instance but can be different
But the language of the session has an implication on the format of the dates too (us english 12/31/2009 <=> french 31/12/2009)
So first to make the script work for all logins with different languages I suggest to change the implicit conversion of the border-dates to an explicit one which will make it language-independent (if not and the language is french, the dates could be wrongly interpreted).
SET @vDate_Start = CONVERT(datetime,'01/01/2010',101)
SET @vDate_End = CONVERT(datetime,'12/31/2010',101)
or if you like it the iso-way
SET @vDate_Start = CONVERT(datetime,'20100101',112)
SET @vDate_End = CONVERT(datetime,'20101231',112)
Now if the language of the user really reflects his own language, all should work fine, but this is not always the case (all installed default => language of the users us_english in a European bi-lingual environment, etc.).
Now to add to this script the possibility to change the first day of the week one can do 2 things at the beginning of the script:
1) to change in a session the first day in the week
SET DATEFIRST 1
This will only change the first day to monday, all names of months and days will still be in English.
2) or you can set the language of a session:
SET LANGUAGE dutch
This will also show the names of months and days in Dutch (and as well change the first day to monday)