[OT] SELECT ... LIKE with iBatis

2004-03-26 Thread Andy Engle
Hi all,

I am trying to write a SELECT ... LIKE %whatever% statement with
iBatis but I can't seem to get it to work, nor can I find a clear
explanation of how to do this.  Does anybody have a code snippet they
could share with me of how to do this?

Thanks in advance.


Andy


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] SELECT ... LIKE with iBatis

2004-03-26 Thread Ronald Rotteveel
Hi Andy,

we have a same kind of statement in our xml file and it looks like this:

codesnippet
mapped-statement name=statementName result-map=result
 SELECT * FROM tbl_name WHERE column_name LIKE '%';
/mapped-statement
/codesnippet

Pay attention to the single quotes around the %-sign!

Good luck!

Cheers,

Ronald

- Original Message - 
From: Andy Engle [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 26, 2004 7:47 PM
Subject: [OT] SELECT ... LIKE with iBatis


 Hi all,
 
 I am trying to write a SELECT ... LIKE %whatever% statement with
 iBatis but I can't seem to get it to work, nor can I find a clear
 explanation of how to do this.  Does anybody have a code snippet they
 could share with me of how to do this?
 
 Thanks in advance.
 
 
 Andy
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] SELECT ... LIKE with iBatis

2004-03-26 Thread Andy Engle
Ronald Rotteveel [EMAIL PROTECTED] wrote:

 Hi Andy,
 
 we have a same kind of statement in our xml file and it looks like
 this:

 mapped-statement name=statementName result-map=result
  SELECT * FROM tbl_name WHERE column_name LIKE '%';
 /mapped-statement

Right, but I was running into trouble with where to put my #value#. 
Did you have anything like that in there?  I tried stuff like
'%#value#%', %#value#%, and whatever else but it didn't seem to want to
do anything but sit there and look at me.


Andy


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]