Re: Stripping white-space in SELECT statments

Поиск
Список
Период
Сортировка
От Mathieu Arnold
Тема Re: Stripping white-space in SELECT statments
Дата
Msg-id 543384405.1032453683@andromede.reaumur.absolight.net
обсуждение исходный текст
Ответ на Stripping white-space in SELECT statments  (Thorbjörn Eriksson <thorbjorn.eriksson@ec.se>)
Список pgsql-sql

--On jeudi 19 septembre 2002 13:20 +0200 Thorbjörn Eriksson
<thorbjorn.eriksson@ec.se> wrote:

> Hello,
>
> I've encountered a strange behavior in postgres 7.2.1 regarding how psql
> handles strings ending with space characters.
>
> If I want to search for records where the first column (artnrgrpmtrln_1)
> begins with
> '201901  ', our system that uses the database creates the following SQL
> statement:
>
> select artnrgrpmtrln_1 from sr where (artnrgrpmtrln_1>='201901  ' and
> artnrgrpmtrln_1<='201901  ÿ'

and why not
select artnrgrpmtrln_1
from sr
where substr(artnrgrpmtrln_1, 0, 9) = '201901  '


--
Mathieu Arnold


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

Предыдущее
От: Charles Hauser
Дата:
Сообщение: help w/ constructing a SELECT
Следующее
От: PostgreSQL Server
Дата:
Сообщение: Table Copy.