Re: trying to pattern match to a value contained in a column

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: trying to pattern match to a value contained in a column
Дата
Msg-id Pine.LNX.4.30.0012072238000.780-100000@peter.localdomain
обсуждение исходный текст
Ответ на trying to pattern match to a value contained in a column  (Beth Gatewood <bethg@mbt.washington.edu>)
Список pgsql-sql
Beth Gatewood writes:

> So-If I had a table where I had LONG_NAME and ABBR as attributes.
>
> I want something like
>
> SELECT whatever FROM my_table WHERE long_name LIKE '%[the value of ABBR
> in that row]%';

SELECT whatever FROM my_table a, my_table b WHERE a.long_name like (b.abbr || '%');

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



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

Предыдущее
От: "Francis Solomon"
Дата:
Сообщение: RE: trying to pattern match to a value contained in a column
Следующее
От: Beth Gatewood
Дата:
Сообщение: Re: trying to pattern match to a value contained in a column