No question at this time
DBA Top 10
1 A. Kavsek 10900
2 M. Cadot 6200
3 P. Wisse 5000
4 B. Vroman 4500
5 T. Boles 2200
6 . Lauri 2000
7 J. Schnackenberg 1300
8 J. PĂ©ran 1100
9 R. Pattyn 700
10 T. P 500
10 G. Graham 500
About
DBA-Village
The DBA-Village forum
Forum as RSS
as RSS feed
Site Statistics
Ever registered users48425
Total active users1512
Act. users last 24h8
Act. users last hour2
Registered user hits last week172
Registered user hits last month818
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: 600 PtsScore: 600 PtsScore: 600 PtsScore: 600 PtsScore: 600 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, 17 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, 17 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, 17 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, 17 days ago
Score:   Score: 600 PtsScore: 600 PtsScore: 600 PtsScore: 600 PtsScore: 600 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, 17 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