Viewing 5 posts - 1 through 5 (of 5 total)
If we take a subset of dates then the same is working
If we need all the dates of a Year to be taken in that query, is it possible as...
August 18, 2012 at 2:03 am
my dynamic Query which will be in variable @query is not taking values greater than 8000, even though i have declared it as varchar(max)
Print @query is returning only 8000 charcters...
August 17, 2012 at 7:18 am
DECLARE @query VARCHAR(max)
declare @cols VARCHAR(max)
set @cols=dbo.[getAllDaysInYear]()
print @cols
SET @query = N'SELECT userid, '+@cols +'
FROM
( select userId,CONVERT(VARCHAR(10), loggedDate, 120) as loggedDate,logCount from loginStats
)
AS Q1
PIVOT
(
sum( logCount) FOR loggedDate IN ('+@cols...
August 17, 2012 at 5:24 am
I want result which will give the last record flag for a partitioned list
i.e.,for the third row the flag should be LAST
testCol rowno DUPREQ
a ...
April 20, 2012 at 11:33 pm
for a table containing n cols (col1,col2.....coln) i want to exclude col1,col2
March 9, 2011 at 10:23 am
Viewing 5 posts - 1 through 5 (of 5 total)