Pattern matching

From: Dale Seaburg <kg5lt(at)verizon(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Pattern matching
Date: 2007-10-21 01:23:06
Message-ID: 8DB56A6D-EB1C-4D04-8F18-A14F9761EC77@verizon.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I have an sql question. I need to be able to search for text which
may have buried single-quotes. I need to be able to effectively
ignore the single-quote in the WHERE clause. Here is an example of
what a user might be looking for, but the data may have an embedded
single-quote:

PARKS PLACE ADDN

But, the data field may contain one of the two following entries,
both legitimate:

PARKS PLACE ADDN
PARK'S PLACE ADDN

What would be the best way to structure the WHERE clause to
effectively capture both types of records?

The more general question would be, "How to structure a query to
ignore certain characters?"

Regards,

Dale Seaburg

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Greg Sabino Mullane 2007-10-21 12:45:32 Re: Pattern matching
Previous Message Jon Jensen 2007-10-19 00:03:00 Re: Do I really have to convert text to varchar and varchar to varchar[] to do an INSERT?