X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A6F3953592 for ; Wed, 13 Apr 2005 02:02:11 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 85045-04 for ; Wed, 13 Apr 2005 05:02:08 +0000 (GMT) Received: from secf.com (209-128-104-244.bayarea.net [209.128.104.244]) by svr1.postgresql.org (Postfix) with ESMTP id 35CB753415 for ; Wed, 13 Apr 2005 02:02:07 -0300 (ADT) Received: from dinesh by secf.com (MDaemon.PRO.v7.2.2.R) with ESMTP id md50000619924.msg for ; Tue, 12 Apr 2005 22:01:37 -0700 Reply-To: From: "Dinesh Pandey" To: , Subject: Re: ignore single character in SELECT query? Date: Wed, 13 Apr 2005 10:28:44 +0530 Organization: Second Foundation India P Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-reply-to: <1113360363.473080.314360@z14g2000cwz.googlegroups.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Thread-Index: AcU/43c0iggUcxP1RnmE4LZW6F81LQAAK6ug X-Authenticated-Sender: dpandey@secf.com X-Spam-Processed: mail.secf.com, Tue, 12 Apr 2005 22:01:37 -0700 (not processed: message from valid local sender) X-MDRemoteIP: 220.227.32.11 X-Return-Path: dpandey@secf.com X-MDaemon-Deliver-To: pgsql-sql@postgresql.org X-MDAV-Processed: mail.secf.com, Tue, 12 Apr 2005 22:01:40 -0700 Message-Id: <20050413050207.35CB753415@svr1.postgresql.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.405 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, MSGID_FROM_MTA_ID X-Spam-Level: * X-Archive-Number: 200504/181 X-Sequence-Number: 21074 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