Home » SQL & PL/SQL » SQL & PL/SQL » Pivot query
Pivot query [message #210028] Tue, 19 December 2006 00:50 Go to next message
Messages: 34
Registered: November 2006
Location: india
i have a table emp with empno ename
the data is like

empno ename
100 aaaa
200 bbbb
300 cccc
400 hhhh
500 gggg
600 ffff

from this if i select from the table i want the result like

empno ename
100,200,300 aaaa,bbbb,cccc
400,500,600 hhhh,gggg,ffff

please help me in this

[Updated on: Tue, 19 December 2006 00:51] by Moderator

Report message to a moderator

Re: Pivot query [message #210033 is a reply to message #210028] Tue, 19 December 2006 00:54 Go to previous message
Messages: 7062
Registered: December 2001
Senior Member
Hi, I've given your topic a more appropriate title. "please help" does not say anything about your problem.

So you want to concatenate 3 consecutive column values for empno and ename. Do you have any column to sort or group your records or is it at random? I believe STRAGG or CONCAT_ALL could help you out. Search the board (please do) for examples of their installation and usage.


[Updated on: Tue, 19 December 2006 00:55]

Report message to a moderator

Previous Topic: tnsnames.ora and listener.ora
Next Topic: varchar2 v/s char function
Goto Forum:

Current Time: Tue Aug 22 00:38:23 CDT 2017

Total time taken to generate the page: 0.01616 seconds