Home » SQL & PL/SQL » SQL & PL/SQL » greater of value in a given list
greater of value in a given list [message #423680] Sat, 26 September 2009 07:18 Go to next message
oradbaexp
Messages: 16
Registered: January 2009
Junior Member
Hi

Out of sum(bytes), sum(maxbytes) from dba_data_Files , i have to select the greater one. Can any one please help me how to do it.
some thing like

select max(sum(bytes), sum(maxbytes)) from dba_data_files;

But ofcourse , its not working.
I tried to use decode function,but its not useful.

Thanks in advance.

Regards...
Re: greater of value in a given list [message #423683 is a reply to message #423680] Sat, 26 September 2009 08:38 Go to previous messageGo to next message
BlackSwan
Messages: 24915
Registered: January 2009
Senior Member
When all else fails, Read The Fine Manual

http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions060.htm#i77473

GREATEST() function
Re: greater of value in a given list [message #423687 is a reply to message #423680] Sat, 26 September 2009 08:57 Go to previous messageGo to next message
oradbaexp
Messages: 16
Registered: January 2009
Junior Member
Laughing

thanks a lot..

select greatest(sum(bytes),sum(maxbytes)) from dba_data_files;


seems i am doing too much of thinking now a days..

Regards...
Re: greater of value in a given list [message #423693 is a reply to message #423687] Sat, 26 September 2009 10:12 Go to previous messageGo to next message
BlackSwan
Messages: 24915
Registered: January 2009
Senior Member
>seems i am doing too much of thinking now a days..
Not everyone would agree with you.

Re: greater of value in a given list [message #423697 is a reply to message #423693] Sat, 26 September 2009 12:43 Go to previous message
Michel Cadot
Messages: 63817
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
BlackSwan wrote on Sat, 26 September 2009 17:12
>seems i am doing too much of thinking now a days..
Not everyone would agree with you.


./fa/449/0/


Previous Topic: sending email with authentication
Next Topic: External procedure error
Goto Forum:
  


Current Time: Fri Sep 30 21:03:18 CDT 2016

Total time taken to generate the page: 0.13722 seconds