converting row to column [message #284509] |
Thu, 29 November 2007 22:58 |
|
Hi,
I want to select row in column order...
select no from table1
1
2
3
i need the result like this
select no from table1
1 2 3 ..
|
|
|
|
Re: converting row to column [message #284549 is a reply to message #284534] |
Fri, 30 November 2007 01:00 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
I'm not familiar with 11g (yet) so I can't tell about the pivoting capabilities there but in older Oracle versions you are limited:
1. you know how many rows you will retrieve. Then you can make separate columns for each row using a decode/case construction.
2. you don't know how many rows you will retrieve. You can concatenate (using CONCAT_ALL, STRAGG, ...) the contents to a single string.
Search the board for more info.
MHE
[Updated on: Fri, 30 November 2007 01:01] Report message to a moderator
|
|
|