GROUP_CONCAT question
I am trying to extract/transpose some data, and from other posts I think GROUP_CONCAT may be the answer, but perhaps a little too complicated yet for me!
I have this information in a table:
Order | Product | Option | Value |
1 | 10 | Colour | Red |
1 | 10 | Size | Large |
1 | 10 | Sleeve | Short |
2 | 10 | Colour | Blue |
2 | 10 | Size | Small |
2 | 10 | Sleeve | Long |
and want it to be extracted like this:
Order | Product | Colour | Size | Sleeve |
1 | 10 | Red | Large | Short |
2 | 10 | Blue | Small | Long |
I've managed to get all the Values crammed into one column, with the values separated by a symbol (like this: | 1 | 10 | Red, Large, Short | ), but it would be much better to have them in separate columns.
Can someone help me with this?
Steve
Subject
Written By
Posted
GROUP_CONCAT question
March 17, 2010 09:25AM
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.