Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 13592 invoked from network); 1 Oct 2009 23:37:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Oct 2009 23:37:22 -0000 Received: (qmail 91161 invoked by uid 500); 1 Oct 2009 23:37:21 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 91104 invoked by uid 500); 1 Oct 2009 23:37:20 -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 91096 invoked by uid 99); 1 Oct 2009 23:37:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Oct 2009 23:37:20 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of anoopkumarv@gmail.com designates 209.85.220.221 as permitted sender) Received: from [209.85.220.221] (HELO mail-fx0-f221.google.com) (209.85.220.221) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Oct 2009 23:37:09 +0000 Received: by fxm21 with SMTP id 21so587650fxm.33 for ; Thu, 01 Oct 2009 16:36:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=+ojeIphA1p9Anf+ynGItHX2Q0n+z169p6nEZSgQtc4Q=; b=tMriKANfP4sBkev92o3RJd/T12X01OuwynQtYc8MmqKN0YQHyd+AGm4C17k2hT5jJY 4PnWaYjeNBvOXs/gpl2rW1pM1OUE9/6lQp/9CQ34yatPV1HDYE/ZAAQDL/kkiryhQXSl AzqmfUZFyPFBBM+G/09YCf4i2JSQ8jWMxesHc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=wx24V+vQGIsSOxLGhuDaT6KqG/FYAdGpEj5UeugBDyNcpOyiL9VGifr3M7tk+fkl5w N/Yjv46knEw4SUY3+cvscS6ofqeiqjALyl1a4GRAQ4WqMm7RiWH/I/+Gmb95g1qZtPR3 r5TU1GkB5LBSEZ/V/L/ZprKOtN+rGA+cELXAc= MIME-Version: 1.0 Received: by 10.103.78.31 with SMTP id f31mr690935mul.24.1254440209308; Thu, 01 Oct 2009 16:36:49 -0700 (PDT) In-Reply-To: <35dbee350909230557r23325bx11266c51b1c99acb@mail.gmail.com> References: <25531101.post@talk.nabble.com> <25531117.post@talk.nabble.com> <35dbee350909230557r23325bx11266c51b1c99acb@mail.gmail.com> Date: Thu, 1 Oct 2009 19:36:49 -0400 Message-ID: Subject: Re: like issue plz help me From: Anoop kumar V To: user-java@ibatis.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Exactly my point - 2 different sql queries will output 2 different sets of results On 9/23/09, Dan Turkenkopf wrote: > I might be missing your question, but... Your ibatis query is > wildcarded on both sides versus your straight SQL one. Try removing > the first %. > > On Wednesday, September 23, 2009, quinya wrote: >> >> Not sure if I understand right but can't you just do... >> >> select * from Someone where UPPER(name) like UPPER(#name# ) >> >> Then put the '%' in the actual name proerty value. As in String s =3D >> "%nameParamValue%"; >> >> That's how I do my LIKE statements. >> >> >> >> HelpMePlz wrote: >>> >>> Hi to all, >>> >>> select * from Someone where name like 'a%' >>> this is in oracel >>> >>> if i run this query =A0i am getting only 3 records >>> >>> for this query in ibatis >>> >>> Select * from someone where UPPER(NAME) LIKE =A0'%' || >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 UPPER(#name#)||'%' >>> >>> if i run this query i am getting all the results which =A0name contain = 'a ' >>> in that like i am getting 10 results but i have to get only 3 results >>> which name strating =A0with 'a' >>> >>> >>> please can any one help me it is very urgent for me >>> >>> i tried like this also which is qiven in FAQ in Ibatis >>> >>> >>> Select * from someone where UPPER(NAME) LIKE =A0'%%' || >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 UPPER(#name#)||'%%' >>> http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+= use+LIKE+in+my+queries >>> >>> ' >>> >>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/like-issue-plz-help-me-tp25531101p25531117.html >> Sent from the iBATIS - User - Java mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org >> For additional commands, e-mail: user-java-help@ibatis.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org > For additional commands, e-mail: user-java-help@ibatis.apache.org > > --=20 Thanks, Anoop --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org For additional commands, e-mail: user-java-help@ibatis.apache.org