Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Is there a "maximum magnitude" function?
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