need a query (columns to rows and rows to columns)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • muhammadrashidmughal
    New Member
    • Feb 2008
    • 13

    need a query (columns to rows and rows to columns)

    columns f1 f2 f2 f4 f5 f6 f7 f8 ......
    1
    2
    3
    4
    .
    .
    i have a table in which multiple columns and records more than 1000 ,
    i need a query to convert these records in columns and columns in rows.

    rashid
  • Delerna
    Recognized Expert Top Contributor
    • Jan 2008
    • 1134

    #2
    huh ?????

    Can you expand that?

    Comment

    • ck9663
      Recognized Expert Specialist
      • Jun 2007
      • 2878

      #3
      If you're using sql 2005, you can use PIVOT and UNPIVOT.

      -- CK

      Comment

      • muhammadrashidmughal
        New Member
        • Feb 2008
        • 13

        #4
        dear plz send me query


        thanxs

        Comment

        • ck9663
          Recognized Expert Specialist
          • Jun 2007
          • 2878

          #5
          More info please.

          How does your table look like and what's your desired output?


          -- CK

          Comment

          Working...