MySQL Forums
Forum List  »  New in 4.1: Subqueries

Transpose row into column
Posted by: sai ram
Date: April 21, 2005 01:25AM

Hi

I want to transpose row into column

eg.,

Site Part Quantity
Site A Part 1 5
Site A Part 2 3
Site A Part 3 1
Site B Part 1 7
Site B Part 3 10
Site C Part 2 2
Site C Part 4 5

The above should be transposed like below

Site Part 1 Part 2 Part 3 Part 4
Site A 5 3 1
Site B 7 10
Site C 2 5

Some refer that Mysql with SAS will do this kind of transpose.,I don't have any knowledge about SAS .,
Currently I am using inner joins to get the result.,But its a costly process.,


Any help would be great.,

Sairam
Chennai.,India

Options: Reply• Quote


Subject
Views
Written By
Posted
Transpose row into column
57791
April 21, 2005 01:25AM
29449
April 23, 2005 11:23PM
26070
April 24, 2005 11:32PM
43330
May 12, 2005 05:26AM
25215
November 21, 2005 10:16AM
18594
October 09, 2006 01:46AM
21666
January 04, 2007 05:03PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.