Viewing 7 posts - 16 through 22 (of 22 total)
I'm able to pivot the data by this query:
select City,Sun,Mon,Tue,Wed,Thu,Fri,Sat
from
(select City, MovieNames, ReleaseDate, substring(datename(dw,ReleaseDate),1,3) As DayName
from tblMovieReleasedIn) As a
pivot
( count (ReleaseDate)
for DayName in ([Sun],[Mon],[Tue],[Wed],[Thu],[Fri],[Sat]))
As b
order by City
Now my...
July 19, 2010 at 12:56 am
I'm able to get the day of the week, but how to pivot the data ?
July 19, 2010 at 12:18 am
Hi, this not a home work... I took from a blog... I'm looking for any ideas to do it 🙂
July 18, 2010 at 10:08 pm
The code is working properly 😛
Kingston and Newbee, thanks a lot... At least I have learned some new SQL skills
June 25, 2010 at 2:35 am
Hi, the requirements like this;
Must make sure the EndDate of line is StartDate - 1 of next line
for the same set of PK (in this case the PK is Index_code,...
June 25, 2010 at 12:30 am
Hi, the code is working fine ...however if i have data like these... this code gave me incorrect result
IF OBJECT_ID('TempDB..#Ixtable','U') IS NOT NULL
DROP TABLE #Ixtable
CREATE TABLE #Ixtable
(Index_code varchar(20),Code1...
June 24, 2010 at 9:01 pm
Viewing 7 posts - 16 through 22 (of 22 total)