DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: How to copy rows to columns

  1. #1
    Join Date
    Aug 2007
    Posts
    3

    How to copy rows to columns

    Hi all,

    i have data in a table..
    i want the values in the rows to place in columns and columns into rows..
    for ex:-there is one table
    name id dept
    a 1 x
    b 2 y
    c 3 z
    i want the resultant table should look like this
    a b c
    1 2 3
    x y z
    is it possible to change............

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Don't be that lazy; at least pretend you are trying and show some code LOL
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Jan 2007
    Posts
    5
    Hi Ravvi
    The article below explains how to display row data in columns using a select statement.
    http://www.astral-consultancy.co.uk/...doco.cgi?11310
    Hope this helps
    :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width