No question at this time
DBA Top 10
1 A. Kavsek 10000
2 M. Cadot 9900
3 B. Vroman 5700
4 P. Wisse 4300
5 J. PĂ©ran 1800
6 . Lauri 1200
7 J. Schnackenberg 600
8 F. Pachot 500
9 Z. Hudec 400
9 G. Lambregts 400
9 N. Havard 400
About
DBA-Village
The DBA-Village forum
Forum as RSS
as RSS feed
Site Statistics
Ever registered users48503
Total active users1429
Act. users last 24h2
Act. users last hour0
Registered user hits last week104
Registered user hits last month599
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, 269 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, 269 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, 269 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, 269 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, 268 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