Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Is there a "maximum magnitude" function?

Is there a "maximum magnitude" function?

From: Derek Sorensen <derek.sorensen_at_tnsofres.com>
Date: 3 Feb 1999 08:43:49 GMT
Message-ID: <01be4f51$48aa05c0$570610ac@pc1879.tnagb.com>


Hi,

I want to use a group function to return the largest magnitude value for a column.

e.g. if the column contains -10, 4, 5

then:

        max(col) will return 5;
and:

        max(abs(col)) will return 10;

but:

        I want to say fn(col) and get -10.

where fn is the function name.

Alternatively, how can I write a new group function? I know how to do this for single-row, but don't even know whether it is possible to write a group function.

Regards,

Derek Sorensen Received on Wed Feb 03 1999 - 02:43:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US