Re: Finding nearest numeric value

Поиск
Список
Период
Сортировка
От Poul Møller Hansen
Тема Re: Finding nearest numeric value
Дата
Msg-id 43034320.2040900@pbnet.dk
обсуждение исходный текст
Ответ на Re: Finding nearest numeric value  (Sean Davis <sdavis2@mail.nih.gov>)
Ответы Re: Finding nearest numeric value  (Sean Davis <sdavis2@mail.nih.gov>)
Список pgsql-general
>To find the nearest value in number_column to some CONSTANT (where you
>replace constant with a number), try:
>
>select *,(number_column - CONSTANT)^2 as d from tablename order by d limit
>1;
>
>Does that do it for you?
>
>Sean
>
>
It does ideed, not that I understood how, but I will find out.
Thank you very much.

Poul


В списке pgsql-general по дате отправления:

Предыдущее
От: Christopher Browne
Дата:
Сообщение: Re: cobol storedprocedures
Следующее
От: Csaba Nagy
Дата:
Сообщение: Re: Finding nearest numeric value