Results 1 to 3 of 3

Thread: convert rows to colums help

  1. #1
    Join Date
    Oct 2005
    Posts
    2

    convert rows to colums help

    Hi I have a problem.
    how can i get this:
    Table: a
    column1 colum2 colum3
    a xA xA
    b xB xB
    c xC x2c
    a x2A x2A

    To this:
    name valueA valueA name 2 valueb valueb etc
    a xA xA b xB xB
    a x2A x2A

    thx korwe

  2. #2
    Join Date
    Oct 2005
    Posts
    2,557
    It can be done, but it depends on your database system. The easiest is Access because you can export an Access table to Excel, transpose the columns and rows, and then put the worksheet into Access. SQL Server to Access to Excel, and then reverse. Oracle:
    http://www.oracle.com/technology/ora...04/050304.html

  3. #3
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    If you have limited number of values in column1 that you want to transpose, then it is possible using CASE statement.

    But it is not very clear from the sample you posted, what you want in result. You have two rows in sample, do you want everything in one row?

Posting Permissions

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