Best Fit SQL query statement

Поиск
Список
Период
Сортировка
От Kiran
Тема Best Fit SQL query statement
Дата
Msg-id 1186390627.045596.148460@j4g2000prf.googlegroups.com
обсуждение исходный текст
Ответы Re: Best Fit SQL query statement  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-sql
All,

Could anyone  help me in writing Best Fit SQL statement.
Suppose we have table t1 with coloumn t1 (text) with following rows.
98456
98457
9845
9846
984
985
98
99


and if I query on 98456 the result must be 98456,
However if I query on 98455 the result must be 9845
and If I query 9849 the result must be 984

Regards,
Kiran



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

Предыдущее
От: Lew
Дата:
Сообщение: Re: Race condition in resetting a sequence
Следующее
От: Ranieri Mazili
Дата:
Сообщение: Using function like where clause