No question at this time
DBA Top 10
1 A. Kavsek 12200
2 M. Cadot 7000
3 P. Wisse 5600
4 B. Vroman 5400
5 J. PĂ©ran 1900
6 . Lauri 1500
7 T. P 500
7 R. Pattyn 500
9 T. Boles 400
10 A. Chavan 300
10 J. Schnackenberg 300
10 D. Johnson 300
About
DBA-Village
The DBA-Village forum
Forum as RSS
as RSS feed
Site Statistics
Ever registered users48454
Total active users1499
Act. users last 24h5
Act. users last hour0
Registered user hits last week216
Registered user hits last month950
Go up

row to columns
Next thread: Regd. Bounded Recovery Checkpoint and BR Interval Regd.
Prev thread: Changing Oracle11g 11.2.0.4 database characterset WE8MSWIN1252

Message Score Author Date
Dear Gurus, Please help me to change row to co...... dattatraya walgude Sep 02, 2019, 15:44
Hi dattatraya, You will need to use a technique...... Lauri Sep 02, 2019, 16:25
Thanks Lauri Will check.... dattatraya walgude Sep 02, 2019, 16:34
Your query returns only <b>1</b> row so it is al...... Score: 800 PtsScore: 800 PtsScore: 800 PtsScore: 800 PtsScore: 800 Pts Michel Cadot Sep 02, 2019, 17:04
Thanks Michel :) ... dattatraya walgude Sep 03, 2019, 07:59

Follow up by mail Click here


Subject: row to columns
Author: dattatraya walgude, India
Date: Sep 02, 2019, 15:44, 78 days ago
Os info: Any
Oracle info: 11.2.0.1 and above
Message: Dear Gurus,

Please help me to change row to columns of following query output.


select *

from (select count(distinct SZ_XXX_NO) SZ_XXX_NO,
count(distinct SZ_XXX_CODE) SZ_XXX_CODE,
sum(I_XXXDAY) I_XXXDAY,
sum(F_XXX_AMT) F_XXX_AMT,
sum(C_XXX_FREQ) C_XXX_FREQ
from tnt);
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re-row to columns
Author: Lauri, Netherlands
Date: Sep 02, 2019, 16:25, 78 days ago
Message: Hi dattatraya,

You will need to use a technique as explained in that link:
https://www.quora.com/How-do-you-convert-rows-to-columns-in-Oracle

Kind Regards
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: Re-row to columns
Author: dattatraya walgude, India
Date: Sep 02, 2019, 16:34, 78 days ago
Message: Thanks Lauri

Will check.
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: row to columns
Author: Michel Cadot, France
Date: Sep 02, 2019, 17:04, 78 days ago
Score:   Score: 800 PtsScore: 800 PtsScore: 800 PtsScore: 800 PtsScore: 800 Pts
Message:
Your query returns only 1 row so it is already in columns:
SQL> select *

2 from (select count(distinct mgr), count(distinct deptno), sum(sal), sum(comm)
3 from emp)
4 /
COUNT(DISTINCTMGR) COUNT(DISTINCTDEPTNO) SUM(SAL) SUM(COMM)
------------------ --------------------- ---------- ----------
6 3 29025 2200

1 row selected.



Regards
Michel
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: row to columns
Author: dattatraya walgude, India
Date: Sep 03, 2019, 07:59, 78 days ago
Message: Thanks Michel :)
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here