| От | Edoardo Panfili |
|---|---|
| Тема | Re: Textmatchning |
| Дата | |
| Msg-id | 13399888.4901221682359057.JavaMail.root@vnr.agr.unipg.it обсуждение исходный текст |
| Ответ на | Textmatchning ("A B" <gentosaker@gmail.com>) |
| Список | pgsql-general |
A B ha scritto: > Hi. > I would like to compare two columns a and b and find all cases where > a is a part of b, like this > select * from mytable where a ilike b; > > but that will not give me a row in the case when a = 'foo' and b='FOOTBALL' > and I want that to be a match. > > So how do I rewrite my expression? I can't find any way to add % to > make it match the way I want. It seems that the order is important. http://www.postgresql.org/docs/8.3/interactive/functions-matching.html#FUNCTIONS-LIKE select 'foo%' ilike 'FOOTBALL'; ---------- f but select 'FOOTBALL' ilike 'foo%'; ---------- t Edoardo
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера