Question on string value expression wildcarding

Поиск
Список
Период
Сортировка
От Steve Wampler
Тема Question on string value expression wildcarding
Дата
Msg-id 39A5664E.CC23534C@noao.edu
обсуждение исходный текст
Ответы Re: Question on string value expression wildcarding
Список pgsql-sql
I have LIKE expressions:
(a)    name LIKE 'kp.dhs.%'       (b)     name LIKE 'kp.dhs%'

where the name column contains strings prefixed with "kp.dhs.".

I'm using postgresql  7.0.2.

Expression (a) fails to match any names while (b) matches
all strings prefixed with "kp.dhs", including (as expected)
those prefixed with "kp.dhs.".

So I take it that ".%" has some special meaning in wildcarding,
but my (limited) SQL references don't mention this case.
Is this To Be Expected SQL behavior?  If so, what
expression can be used to match only strings prefixed with
"kp.dhs."?

Thanks!
--
Steve Wampler-  SOLIS Project, National Solar Observatory
swampler@noao.edu


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

Предыдущее
От: "Ingram, Bryan"
Дата:
Сообщение: Is there a way to tell if db has changed?
Следующее
От: rdg@viafractal.com.br
Дата:
Сообщение: weird structure