Viewing 5 posts - 1 through 5 (of 5 total)
There is a cute solution which i borrowed from some articles about Tallys on this Web-Site.
Check this out: http://www.sqlservercentral.com/articles/T-SQL/63003/
Here is how i implemented:
1. Create a Tally table. This...
August 10, 2010 at 7:00 am
i like this solution "((DatePart(dw,'2009-12-17') + @@DateFirst -2)%7)+1"
this is the best
February 19, 2010 at 3:18 am
this is what i've come up with years ago:
it returns Monday as 1, Teusday as 2 etc..., regardles of @@Datefirst.
declare @Date datetime
select @Date = '2009-12-17'
selectcasewhen (datepart(weekday,@Date) + @@Datefirst - 1)%7...
February 19, 2010 at 2:55 am
Hi guys,
my reason for googling about varchar(max) and varchar(8000) is daclaration of variables.
Is there any performance effect when using (max) in scalar functions or table-valued functions?
There have been server performance...
September 22, 2009 at 6:39 am
Viewing 5 posts - 1 through 5 (of 5 total)