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 76223D1B521 for ; Wed, 12 Nov 2003 13:44:32 +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 79684-09 for ; Wed, 12 Nov 2003 09:44:04 -0400 (AST) Received: from cs.Technion.AC.IL (csa.cs.technion.ac.il [132.68.32.1]) by svr1.postgresql.org (Postfix) with ESMTP id 128CCD1B51C for ; Wed, 12 Nov 2003 09:43:59 -0400 (AST) Received: from csd.cs.technion.ac.il (csd.cs.technion.ac.il [132.68.32.8]) by cs.Technion.AC.IL (8.12.9+Sun/8.9.0) with ESMTP id hACDhrw4019650 for ; Wed, 12 Nov 2003 15:43:53 +0200 (IST) Received: from CMP147 (cmp147.cs.technion.ac.il [132.68.38.74]) by csd.cs.technion.ac.il (8.12.9+Sun/8.9.0) with ESMTP id hACDhpjJ010603 for ; Wed, 12 Nov 2003 15:43:52 +0200 (IST) From: "Guy Korland" To: Subject: SQL substring Date: Wed, 12 Nov 2003 15:44:25 +0200 Message-ID: <00e501c3a923$162d4180$4a264484@cs.technion.ac.il> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200311/140 X-Sequence-Number: 15955 Hi, How can I compare two fields if one is a substring of the other? Something like: ... WHERE StringA like '%' + StringB + '%'; Thanks, Guy Korland