Selecting rows having substring in a column

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Selecting rows having substring in a column
Дата
Msg-id alpine.LNX.2.20.1908290704290.2953@salmo.appl-ecosys.com
обсуждение исходный текст
Ответы Re: Selecting rows having substring in a column  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: Selecting rows having substring in a column  (Gary Cowell <gary.cowell+pgsql@gmail.com>)
Список pgsql-general
Using postgres-11.1 here. My SQL knowledge needs expanding and my web
searches have not found a satisfactory answer. I hope to learn the correct
approach here.

A table (Fishes) has an attribute column stream_trib with values such as
     Small Creek trib to Winding River
     Roaring River trib to Winding River
and I want to find all rows containing Winding River in that column.

The postgres substring function takes as arguments the substring, starting
position, and length. In my table the staring position varies although the
length remains constant.

I need to learn how to construct a SELECT statement that returns the set of
rows containing the substring 'Winding River'. A pointer to references would
be great; so would a detailed lesson in handling this and similar queries.

Regards,

Rich



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: implicit transaction changes trigger behaviour
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Selecting rows having substring in a column