Forum Replies Created

Viewing 7 posts - 16 through 22 (of 22 total)

  • RE: SQL Query Problem

    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...

  • RE: SQL Query Problem

    I'm able to get the day of the week, but how to pivot the data ?

  • RE: SQL Query Problem

    Hi, this not a home work... I took from a blog... I'm looking for any ideas to do it 🙂

  • RE: Query Help

    The code is working properly 😛

    Kingston and Newbee, thanks a lot... At least I have learned some new SQL skills

  • RE: Query Help

    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,...

  • RE: Query Help

    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...

  • RE: Query Help

    Let me study the code first... Thanks dude

Viewing 7 posts - 16 through 22 (of 22 total)