Viewing 7 posts - 1 through 7 (of 7 total)
I guessed 2 because BETWEEN is inclusive, and then I tried to run it. I found out that I needed SQL Server 2008 compatibility, don't have that, only 2005,...
March 30, 2012 at 5:57 am
Good catch, thank you.
It turns out that @table was empty because I used a database where the sys.master_files table was empty; therefore, no rows for the cte...
Live and learn
๐
March 3, 2010 at 9:25 am
With the given SQL, @temp is an empty table, therefore count(1) will always return 0.
March 3, 2010 at 7:05 am
-- Sorry, I get 1 for count(1) using datalength(), record 8.
-- count(1) for Len() rerturns 0
-- What am i doing wrong?
oops, nevermind...
March 3, 2010 at 6:43 am
RBAR comes through again, good work.
Requirement added: However, I donโt want it to overwrite a null salary amount for the next employee if they happen to have a null at...
February 15, 2010 at 7:56 am
These return different results for the end of months preceding a month that has more days in it. For instance January has 31 days, and February only 28 or...
December 2, 2009 at 11:14 am
Very helpful, thanks. You can also take out the dangling delimiter...
DECLARE @var varchar(8000)
SET @var = ''
SELECT @var = @var + FieldName + '/'
FROM Table
SET @Var = substring(@Var,1,len(@Var)-1)-- Removes trailing...
October 14, 2009 at 7:21 am
Viewing 7 posts - 1 through 7 (of 7 total)