Home » SQL & PL/SQL » SQL & PL/SQL » How to display the result horizontally
How to display the result horizontally [message #576947] Mon, 11 February 2013 04:36 Go to next message
balakrishnaallu
Messages: 7
Registered: December 2010
Location: Hyderabad
Junior Member
1.Requirement....

deptno ename
++++++++++++++++++++++++++++++
10 a,d,e,g
20 b,c,j
30 k,l,o

Please give me replay ASAP.

2.How to swap the column values ? ex. col2 into col1 and col1 into col2
3.What is the major Diff. b/w Right outer join & Left outer join ?


[EDITED by LF: fixed topic title typo; was "horizantally"]

[Updated on: Mon, 11 February 2013 10:40] by Moderator

Report message to a moderator

Re: How to display the result horizantally [message #576948 is a reply to message #576947] Mon, 11 February 2013 04:40 Go to previous messageGo to next message
Michel Cadot
Messages: 59775
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
From your previous posts:

Michel Cadot wrote on Fri, 25 February 2011 15:58
...
Before, Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals.
...


Michel Cadot wrote on Fri, 25 February 2011 17:22
...
Once again:
Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals.
...


BlackSwan wrote on Sun, 27 February 2011 15:59
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/


Michel Cadot wrote on Sun, 27 February 2011 19:21
Please read OraFAQ Forum Guide and do not post in UPPER case.
...


I add:
With any SQL or PL/SQL question, please, Post a working Test case: create table and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.

And FEEDBACK to those that help you.

Regards
Michel



Re: How to display the result horizantally [message #576952 is a reply to message #576948] Mon, 11 February 2013 05:34 Go to previous messageGo to next message
rishwinger
Messages: 132
Registered: November 2011
Senior Member
SQL> select deptno,wm_concat(ename) from emp group by deptno;

    DEPTNO              WM_CONCAT(ENAME)
-----------------     --------------------

        10          CLARK,KING,MILLER

        20        SMITH,FORD,ADAMS,SCOTT,JONES

        30        ALLEN,BLAKE,MARTIN,TURNER,JAMES,WARD

Re: How to display the result horizantally [message #576959 is a reply to message #576952] Mon, 11 February 2013 06:36 Go to previous message
Solomon Yakobson
Messages: 2062
Registered: January 2010
Senior Member
WM_CONCAT is undocumented which is enough reason not to use it. WM_CONCAT requires OLAP option. And it behaves different in different versions.

SY.
Previous Topic: PL/sql script store data
Next Topic: Sending mail when DBMS_SCHEDULER job fails
Goto Forum:
  


Current Time: Tue Nov 25 21:34:25 CST 2014

Total time taken to generate the page: 0.08590 seconds