Re: How to match percent sybmol in LIKE operator? - Mailing list pgsql-general

From Holger Klawitter
Subject Re: How to match percent sybmol in LIKE operator?
Date
Msg-id 3A63015E.4C6CBFC2@klawitter.de
Whole thread Raw
In response to How to match percent sybmol in LIKE operator?  (Sergey Filatov <fs@ibis.odessa.ua>)
List pgsql-general
Sergey Filatov wrote:
>
> Greetings.
>
> My problem is to find percent character in some field.
> I'm wonder how specify percent character or other wildcard characters
> in 'LIKE patterns'?
>
> Many thanks in advance,
> Sergey.

You have escape them with the backslash. In order to pass the backslash
to the backend you have to escape the backslash as well:

select * from xxx where yyy like '\\%';

It might be a good idea to point this out in the Postgresql book :-)

With kind regards,
    Holger Klawitter
--
Holger Klawitter
holger@klawitter.de                             http://www.klawitter.de

pgsql-general by date:

Previous
From: Sergey Filatov
Date:
Subject: How to match percent sybmol in LIKE operator?
Next
From: "rob"
Date:
Subject: Re: converting .xls to delimited file