Or '%$name$%', but that opens up the vulnerability for sql injection
-----Original Message----- From: Mikel sanchez [mailto:mikel.sanchez...@gmail.com] Sent: 23 September 2009 02:08 PM To: user-java@ibatis.apache.org Subject: Re: like issue plz help me Can you modify "name" to include %, instead of using it in the query? #name# --> "%" + name + "%" 2009/9/23 HelpMePlz <supriyanaidupell...@gmail.com>: > > Hi to all, > > select * from Someone where name like 'a%' > this is in oracel > > if i run this query i am getting only 3 records > > for this query in ibatis > > Select * from someone where UPPER(NAME) LIKE '%' || > UPPER(#name#)||'%' > > if i run this query i am getting all the results which name contain 'a ' > in that like i am getting 10 results but i have to get only 3 results which > name strating with '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 '%%' || > UPPER(#name#)||'%%' > http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+use+L IKE+in+my+queries > > ' > > > > -- > View this message in context: http://www.nabble.com/like-issue-plz-help-me-tp25531101p25531101.html > Sent from the iBATIS - User - Java mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org > For additional commands, e-mail: user-java-h...@ibatis.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org For additional commands, e-mail: user-java-h...@ibatis.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.110/2385 - Release Date: 09/22/09 17:54:00 --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org For additional commands, e-mail: user-java-h...@ibatis.apache.org