From: Greg Stark <gsstark@mit.edu>
To: jspring@gmail.com
Cc: pgsql-sql@postgresql.org
Subject: Re: ignore single character in SELECT query?
Date: 13 Apr 2005 00:56:08 -0400
Message-ID: <87oecjjmvr.fsf@stark.xeocode.com> (raw)
In-Reply-To: <1113360363.473080.314360@z14g2000cwz.googlegroups.com>
References: <1113360363.473080.314360@z14g2000cwz.googlegroups.com>
jspring@gmail.com writes:
> So basically I want to ignore a single character (the apostrophe
> character), anywhere in the middle of my search word, in selecting
> results. How can I do this?
WHERE replace(name,'''','') like '%dont%'
Beware of quoting issues if "dont" is coming from user supplied inputs.
--
greg
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: gsstark@mit.edu, jspring@gmail.com
Subject: Re: ignore single character in SELECT query?
In-Reply-To: <87oecjjmvr.fsf@stark.xeocode.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