Home » SQL & PL/SQL » SQL & PL/SQL » query help (if, else) (oracle
query help (if, else) [message #594614] Fri, 30 August 2013 13:59 Go to next message
Messages: 192
Registered: October 2011
Senior Member
Can somebody provide me with SQL that does the following;

select name, isdefault, display_value  from v$parameter 
where name in ( 'memory_target' , 'sga_target', 'statistics_level') order by name;

If memory_target is set non-zero, print AMM Else if sga_target is set non-zero 
and statistics_level is TYPICAL or ALL, print ASMM. 

Thanks to all who answer
Re: query help (if, else) [message #594615 is a reply to message #594614] Fri, 30 August 2013 15:18 Go to previous message
Michel Cadot
Messages: 65090
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Just pivot your query to get the 3 rows in 3 column and use CASE.

Previous Topic: Difference between two declaration.
Next Topic: creating a temporary table
Goto Forum:

Current Time: Fri Jul 28 14:37:48 CDT 2017

Total time taken to generate the page: 0.10178 seconds