Re: ILIKE Problem?

Поиск
Список
Период
Сортировка
От Darren Ferguson
Тема Re: ILIKE Problem?
Дата
Msg-id 3ECD5936.9010109@crystalballinc.com
обсуждение исходный текст
Ответ на ILIKE Problem?  ("Corey W. Gibbs" <cgibbs@westmarkproducts.com>)
Список pgsql-general
When you do the first one since you are not using %% values like will
treat this as = so it would have to exactly equal what you put in the
where clause. (someone correct if this is wrong but i believe it is correct)

In the second one you use the % which means it appears anywhere in the
string i.e.

%test - will return test, atest, and test would have to be the last word
in the string.

test% - will return test as the first word followed by anything else

%test% - will return any string with the text "test" in it.

test - will be the same as evlvlist = 'test'

HTH
Darren

Corey W. Gibbs wrote:

>Good Afternoon Everyone,
>
>I was wondering if I am running into a problem with ILIKE.  Here is what happened:
>
>When trying to execute this select statement:
>    SELECT * from elevlist WHERE fulldwgpath ILIKE '\\\\cad_svr\\someDirectory-name-thatis-long\\somefile.dwg'
>0 rows are returned, but if I shorten it to:
>    SELECT * from elevlist WHERE fulldwgpath ='%somefile.dwg%'
>my rows are returned.  fulldwgpath is a varchar(250) datatype.
>
>Any ideas?
>thanks in advance
>corey
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
>http://www.postgresql.org/docs/faqs/FAQ.html
>
>


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Query failed: ERROR: catalog is missing 1 attribute(s) for relid 456086
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [ADMIN] Q: Structured index - which one runs faster?