X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 7A728D1B55A for ; Wed, 12 Nov 2003 15:15:56 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 00373-04 for ; Wed, 12 Nov 2003 11:15:29 -0400 (AST) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 0B329D1B51C for ; Wed, 12 Nov 2003 11:15:25 -0400 (AST) Received: (qmail 30690 invoked by uid 500); 12 Nov 2003 15:13:58 -0000 Date: Wed, 12 Nov 2003 09:13:58 -0600 From: Bruno Wolff III To: Franco Bruno Borghesi Cc: Guy Korland , pgsql-sql@postgresql.org Subject: Re: SQL substring Message-ID: <20031112151358.GA30248@wolff.to> Mail-Followup-To: Franco Bruno Borghesi , Guy Korland , pgsql-sql@postgresql.org References: <00ea01c3a926$4049b6d0$4a264484@cs.technion.ac.il> <1068647911.4251.3.camel@taz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1068647911.4251.3.camel@taz> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/139 X-Sequence-Number: 15954 On Wed, Nov 12, 2003 at 11:38:31 -0300, Franco Bruno Borghesi wrote: > ... WHERE field1 LIKE '%' || field2 || '%' The first way won't work correctly if field2 has %s in it. > or > ... WHERE position(field2 in field1)>0