Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 92488101438B for ; Thu, 1 Mar 2012 12:59:21 -0400 (AST) Received: from gwmta.wicourts.gov ([165.219.244.99] helo=gw.wicourts.gov) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S39La-0004OK-Du for pgsql-bugs@postgresql.org; Thu, 01 Mar 2012 16:59:20 +0000 Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Thu, 01 Mar 2012 10:59:04 -0600 Message-Id: <4F4F56700200002500045D63@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.2 Date: Thu, 01 Mar 2012 10:58:56 -0600 From: "Kevin Grittner" To: , Subject: Re: BUG #6499: query to get data with single quote References: In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201203/5 X-Sequence-Number: 32566 wrote: > I have column(string datatype) has a data starting with single > quote as below > > 'single resource to avoid all job execution' > > Now I want write select query to select records which starts with > single quote. > > I tried with many option however could not get the result. This is not a bug. For help with a question like this, please send an email to one of the other lists, like pgsql-general or pgsql-novice. http://www.postgresql.org/community/lists/ To include an apostrophe in a string literal, double it. Try: SELECT * FROM tblname WHERE colname LIKE '''%'; -Kevin