Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Display Report Veritally for Horizontal Data

Display Report Veritally for Horizontal Data

Scheduled Pinned Locked Moved Database
databasequestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yogesh_kumar_agarwal
    wrote on last edited by
    #1

    Hi All, My database for student installment is like this. ID StudentID Month Year Amount 1 001 4 2009 1000 2 001 5 2009 1000 3 001 6 2009 1000 4 001 7 2009 1000 5 001 8 2009 1000 6 001 9 2009 1000 7 001 10 2009 1000 Now i want the query to display it like StudentID Apr2009 May2009 Jun2009 July2009 001 1000 1000 1000 1000 Any IDEA??? Plz share ur experiences. Thansk Yogesh Agarwal

    I M S 3 Replies Last reply
    0
    • Y yogesh_kumar_agarwal

      Hi All, My database for student installment is like this. ID StudentID Month Year Amount 1 001 4 2009 1000 2 001 5 2009 1000 3 001 6 2009 1000 4 001 7 2009 1000 5 001 8 2009 1000 6 001 9 2009 1000 7 001 10 2009 1000 Now i want the query to display it like StudentID Apr2009 May2009 Jun2009 July2009 001 1000 1000 1000 1000 Any IDEA??? Plz share ur experiences. Thansk Yogesh Agarwal

      I Offline
      I Offline
      i j russell
      wrote on last edited by
      #2

      If you using Sql Server 2005/8, have a look at the PIVOT command.

      1 Reply Last reply
      0
      • Y yogesh_kumar_agarwal

        Hi All, My database for student installment is like this. ID StudentID Month Year Amount 1 001 4 2009 1000 2 001 5 2009 1000 3 001 6 2009 1000 4 001 7 2009 1000 5 001 8 2009 1000 6 001 9 2009 1000 7 001 10 2009 1000 Now i want the query to display it like StudentID Apr2009 May2009 Jun2009 July2009 001 1000 1000 1000 1000 Any IDEA??? Plz share ur experiences. Thansk Yogesh Agarwal

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #3

        Pivot seems to be a hot topic today, read the thread below this one, take a look at this article. Pivot two or more columns in SQL Server 2005[^]

        Never underestimate the power of human stupidity RAH

        1 Reply Last reply
        0
        • Y yogesh_kumar_agarwal

          Hi All, My database for student installment is like this. ID StudentID Month Year Amount 1 001 4 2009 1000 2 001 5 2009 1000 3 001 6 2009 1000 4 001 7 2009 1000 5 001 8 2009 1000 6 001 9 2009 1000 7 001 10 2009 1000 Now i want the query to display it like StudentID Apr2009 May2009 Jun2009 July2009 001 1000 1000 1000 1000 Any IDEA??? Plz share ur experiences. Thansk Yogesh Agarwal

          S Offline
          S Offline
          Sandesh M Patil
          wrote on last edited by
          #4

          Check out the following link PIVOT

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups