Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 19887 invoked from network); 16 Feb 2006 14:28:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Feb 2006 14:28:45 -0000 Received: (qmail 19265 invoked by uid 500); 16 Feb 2006 14:28:44 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 19015 invoked by uid 500); 16 Feb 2006 14:28:42 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 19004 invoked by uid 99); 16 Feb 2006 14:28:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2006 06:28:42 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [195.130.132.54] (HELO hoefnix.telenet-ops.be) (195.130.132.54) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2006 06:28:42 -0800 Received: from nocme1bl6.telenet-ops.be (nocme1bl6.telenet-ops.be [195.130.136.37]) by hoefnix.telenet-ops.be (Postfix) with ESMTP id 10C4AA3504 for ; Thu, 16 Feb 2006 15:25:22 +0100 (CET) Received: from nocme1bl6.telenet-ops.be (localhost.localdomain [127.0.0.1]) by nocme1bl6.telenet-ops.be (Postfix) with ESMTP id F1199388051 for ; Thu, 16 Feb 2006 15:25:21 +0100 (CET) From: "Sven.Boden" To: user-java@ibatis.apache.org Importance: Normal Sensitivity: Normal Message-ID: X-Originating-IP: [192.85.50.2] X-Forwarded-For: [(null)] Date: Thu, 16 Feb 2006 14:25:21 +0000 Subject: Re: Using percentages with like and parameter MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Should also work: select * from table where label like '%' || #keyword# || '%' Regards, Sven >----- Oorspronkelijk bericht ----- >Van: Jared Blitzstein [mailto:mailing-list@blitzstein.net] >Verzonden: donderdag, februari 16, 2006 03:08 PM >Aan: user-java@ibatis.apache.org >Onderwerp: Re: Using percentages with like and parameter > >The way I've done it is actually set the %'s when you setup >#keyword#. So myObject.setKeyword("%myliketerm%"); > >On Feb 16, 2006, at 8:42 AM, Hilde.DE-GRAEVE@ext.cec.eu.int wrote: > >> >> >> Hello, >> >> I have the following select : >> >> Select * from table where label like #keyword# >> >> Does anyone know how to add the % percentages before and after the >> keyword. >> >> I tried it before and after but ibatis does not accept it. >> So I'm doing it in my class that calls the query but would like to >> know if there is another solution. >> >> Thanks, >> >> Hilde >> >> >> > >