pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dinesh Pandey <dpandey@secf.com>
To: jspring@gmail.com
To: pgsql-sql@postgresql.org
Subject: Re: ignore single character in SELECT query?
Date: Wed, 13 Apr 2005 10:28:44 +0530
Message-ID: <20050413050207.35CB753415@svr1.postgresql.org> (raw)
In-Reply-To: <1113360363.473080.314360@z14g2000cwz.googlegroups.com>

Use
--------
select replace(quote_literal('don\'t'), '\'', '');
Or
select replace(quote_ident(myColumnName, '\'', '');

Thanks
Dinesh Pandey


-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]
On Behalf Of jspring@gmail.com
Sent: Wednesday, April 13, 2005 8:16 AM
To: pgsql-sql@postgresql.org
Subject: [SQL] ignore single character in SELECT query?

Given select criteria "dont" I would like to return rows with values
"don't".  Or similarily I want rows with "they're" given input criteria
"theyre".

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?


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@postgresql.org so that your
      message can get through to the mailing list cleanly





view thread (3+ messages)

Message-ID: <20050413050207.35CB753415@svr1.postgresql.org>
Permalink:  ../20050413050207.35CB753415@svr1.postgresql.org/
Also on:    postgresql.org/message-id/20050413050207.35CB753415@svr1.postgresql.org

 · 

reply

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: dpandey@secf.com, jspring@gmail.com
  Subject: Re: ignore single character in SELECT query?
  In-Reply-To: <20050413050207.35CB753415@svr1.postgresql.org>

* 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