Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Display results in same row

Ab007Jan 28 2015 — edited Jan 30 2015


Hello All,

I am running this below query and getting results as expected, with one small glitch, that I want the info in the same line instead of duplicating the row:

SQL

select distinct (substr(target_name, 1, instr(target_name, '_') -1)) DB_NAME,

  (case when value = 'TRUE' then ' <-- db is not configured for Huge Pages.' end) as "Huge Page Status",

  value

from sysman.mgmt$db_init_params

where

  (name like '%use_large%' or name like '%sga_max%')

  and isdefault='TRUE'

  and value > '32212254720'

  order by DB_NAME;

Current Output:

DB_NAMEHuge Page StatusValue

DB1

DB1

DB2

DB2

DB3

DB3

  <-- db is not configured for Huge Pages.

  <-- db is not configured for Huge Pages.

  <-- db is not configured for Huge Pages.

35

45

45

Desired Output:

DB_NAMEHuge Page StatusValue

DB1

DB2

DB3

  <-- db is not configured for Huge Pages.

  <-- db is not configured for Huge Pages.

  <-- db is not configured for Huge Pages.

35

45

45


What do I need to tweak in my query to duplication of rows from my output?

Much appreciate your help.

Thanks in advance,

aBBy

This post has been answered by James Su on Jan 30 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 27 2015
Added on Jan 28 2015
20 comments
3,356 views