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. Query help in SQL Server 2005

Query help in SQL Server 2005

Scheduled Pinned Locked Moved Database
2 Posts 2 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.
  • K Offline
    K Offline
    K V Sekhar
    wrote on last edited by
    #1

    hai all, In my database table i have a data in a table like below X 102 Y 101 Z 123 X 142 Y 245 Z 625 X 234 Y 432 Z 111 How can i get the data from table kike below. X Y Z 102 101 123 142 245 625 234 432 111 Please help me how to write select query for below. Thanks in advance, cheers, sekhar

    modified on Saturday, April 4, 2009 7:26 AM

    S 1 Reply Last reply
    0
    • K K V Sekhar

      hai all, In my database table i have a data in a table like below X 102 Y 101 Z 123 X 142 Y 245 Z 625 X 234 Y 432 Z 111 How can i get the data from table kike below. X Y Z 102 101 123 142 245 625 234 432 111 Please help me how to write select query for below. Thanks in advance, cheers, sekhar

      modified on Saturday, April 4, 2009 7:26 AM

      S Offline
      S Offline
      Syed Mehroz Alam
      wrote on last edited by
      #2

      Hi, You need to use SQL 2005's PIVOT statement. Have a look at examples here[^]. Regards, Syed Mehroz Alam.

      My Blog My Articles Computers are incredibly fast, accurate, and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination. - Albert Einstein

      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