column to rows [message #338678] |
Tue, 05 August 2008 11:14  |
navkrish
Messages: 189 Registered: May 2006 Location: NJ,USA
|
Senior Member |

|
|
Hi,
I have to convert column to rows as below
Data in table
id type type1 type2 resistance_in flex_in durable_in
1 IC semi macro X X X
2 IC semi mini X X X
3 Die Y Y N
4 Die Y N Y
5 Die Y Y N
output required
1 IC
1 Semi
1 macro
2 IC
2 Semi
2 mini
3 Die
3 Y
3 Y
3 N
4 Die
4 Y
4 N
4 Y
5 Die
5 Y
5 Y
5 N
Is there a way to achieve this without UNION in sql?
[EDITED by LF: fixed topic title typo; was "column ro rows"]
[Updated on: Tue, 05 August 2008 11:54] by Moderator Report message to a moderator
|
|
|
Re: column ro rows [message #338683 is a reply to message #338678] |
Tue, 05 August 2008 11:24  |
 |
Michel Cadot
Messages: 68737 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Put your title (after fixing the typo) in the search field and you will find many answers.
Regards
Michel
|
|
|