Re: Non-standard escape sequences from Crystal Reports

Поиск
Список
Период
Сортировка
От Rajesh Kumar Mallah
Тема Re: Non-standard escape sequences from Crystal Reports
Дата
Msg-id AANLkTikOgJ2zCEZotYmTQ6RhzrkuqayCiS7L9N7Dp6_N@mail.gmail.com
обсуждение исходный текст
Ответ на Non-standard escape sequences from Crystal Reports  ("Rob Richardson" <Rob.Richardson@rad-con.com>)
Список pgsql-general
Dear Rob,
Please do not go offlist.

Its not a matter of cancelling,
consider  the fragment  --> relname like 'coil\\_status'
the underscore has to be escaped because if its not done
'_' will match any *single* character (rule of ilike matching) ,
 its escaped so that it matches  '_' in strings.
 two backslash is required so that ilike gets \_
it is the rule of quoting literal values in sql.

if you can add E you can get rid of the warnings.

Regds
Rajesh Kumar Mallah.

On Tue, Oct 5, 2010 at 2:18 PM, Rob Richardson
<Rob.Richardson@rad-con.com> wrote:
> Thank you very much!  Your examples worked as you said they would work, and
> they showed that my database is logging those warnings when they happen.
> That indicates that the difference is in the Crystal Reports installation
> someplace.
>
> I don't understand how the backslashes are handled.  I added underscores to
> a couple of records in my coilstatus table, so one had "Fr_ee" and another
> had "Pack_ed".  Then, the query "SELECT status from coilstatus  where status
> like '%\\_%' limit 10;" gave me the warning that you predicted, and it found
> the two records with underscored statuses.  That tells me that the two
> backslashes cancelled each other out, and the query was the same as "SELECT
> status from coilstatus  where status like '%_%' limit 10;".  Why is that?
> Do I need to read about regular expressions?
>
> RobR
>
>

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

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: PG website testing
Следующее
От: Dave Page
Дата:
Сообщение: Re: Problem installing 9.0.1 on Windows 7 x64