Home » RDBMS Server » Server Administration » nearest value
nearest value [message #373437] Tue, 17 April 2001 05:40 Go to next message
anandh
Messages: 2
Registered: April 2001
Junior Member
hi all
I want to know the method to retrieve the nearest value from a table for a given value .
(i.e) if i compare 9 with the table having the following data
1
4
7
10
12
14
it should return 10.
(Using sql)

thanx in advance
Re: nearest value [message #373439 is a reply to message #373437] Tue, 17 April 2001 07:45 Go to previous message
Koresh
Messages: 4
Registered: April 1999
Junior Member
Hi
Try
Select max(Column_with_numbers)
from Table_of_numbers
where Column_with_numbers>9

Regards.
Koresh.
Previous Topic: Help with Join
Next Topic: Re: How can i copy tables !!!
Goto Forum:
  


Current Time: Tue Jul 02 12:47:26 CDT 2024