Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: getting the nearest number from a column
Oops, I just realized the GROUP BY clause is redundant. Try this
instead:
SELECT sal FROM saltable
WHERE ABS(1450 - sal) =
(SELECT MIN(ABS(1450 - sal)) FROM saltable);
/Jarl Received on Wed Apr 11 2007 - 04:34:20 CDT
![]() |
![]() |