No question at this time
DBA Top 10
1 M. Cadot 10800
2 A. Kavsek 10100
3 B. Vroman 4800
4 P. Wisse 4200
5 J. Schnackenberg 2900
6 J. PĂ©ran 2000
7 . Lauri 1000
8 F. Pachot 500
9 Z. Hudec 400
9 G. Lambregts 400
9 N. Havard 400
9 T. Boles 400
About
DBA-Village
The DBA-Village forum
Forum as RSS
as RSS feed
Site Statistics
Ever registered users48515
Total active users1426
Act. users last 24h5
Act. users last hour0
Registered user hits last week153
Registered user hits last month718
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, 309 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, 309 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, 309 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, 309 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, 308 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