From: Richard Huxton <dev@archonet.com>
To: Campbell, Lance <lance@uiuc.edu>
Cc: pgsql-sql@postgresql.org
Subject: Re: Like problem
Date: Wed, 13 Feb 2008 16:42:20 +0000
Message-ID: <47B31DEC.5050109@archonet.com> (raw)
In-Reply-To: <B10E6810AC2A2F4EA7550D072CDE8760197EF2@SAB-FENWICK.sab.uiuc.edu>
References: <B10E6810AC2A2F4EA7550D072CDE8760197EF2@SAB-FENWICK.sab.uiuc.edu>
Campbell, Lance wrote:
> 8.2.5
>
> I am having an issue with trying to use 'LIKE' so that I can match on a
> string with an underscore in it. What is the proper way to find the
> following string?
> WARNING: nonstandard use of escape in a string literal
>
> LINE 1: ...ct c1 from t1 where c1 like '%abc\_%';
Either indicate you are using an escaped string: LIKE E'%abc\_%'
Or, change the escape character: LIKE '%abcQ_%' ESCAPE 'Q'
--
Richard Huxton
Archonet Ltd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dev@archonet.com, lance@uiuc.edu
Subject: Re: Like problem
In-Reply-To: <47B31DEC.5050109@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox