Home » SQL & PL/SQL » SQL & PL/SQL » Need help in formatting the displayed result
Need help in formatting the displayed result [message #267720] Fri, 14 September 2007 06:27 Go to next message
Messages: 62
Registered: April 2006
Location: United States, MI
Hello friends,
I am working on a project and I need help from you all.

Explanation of the query:


After execution of the result I may get the o/p as follows:

Empno ename deptno
1 Scott 10
2 woods
3 john 20
5 williams
8 james
10 remo
11 stella 40 Now the problem is I need to display my result in the manner given below:
empno ename deptno
1 2 scott woods 10
3 5 8 10 john williams james remo 20
11 stella 40

Is there any way to display the result in the above mentioned format? If yes, please send me the code snippets for displaying the result in this format. Please don't use concatenation because I need to display all these values in separate cells. Once if you can help me I can use the same in my project and there after push this data to data grid.

Hope you can solve this and forward your suggestions.

Thanks and regards,
Vamsi K Gummadi.

[Updated on: Fri, 14 September 2007 07:35] by Moderator

Report message to a moderator

Re: Urgent: Need help in formatting the displayed result [message #267728 is a reply to message #267720] Fri, 14 September 2007 06:49 Go to previous message
Michel Cadot
Messages: 65138
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yes, use a pivot method which can be found here, on AskTom, on SnippetJoe site...

In addition,
Please read and follow OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button.
Please always post your Oracle version (4 decimals).


[Updated on: Fri, 14 September 2007 06:49]

Report message to a moderator

Previous Topic: Problem with Procedure
Next Topic: First Day Of A Given Week
Goto Forum:

Current Time: Thu Aug 17 18:30:14 CDT 2017

Total time taken to generate the page: 0.10356 seconds