ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Goodin <brandon.goo...@gmail.com>
Subject Re: Using Select...like in XML!
Date Sat, 01 Jan 2005 19:34:28 GMT
try something of the likes of:

Select * from users_table where user_first_name like #M# + '%'

This will vary depending on which database you use. But the only
variance is the concatenation syntax,

Brandon
 

On Wed, 29 Dec 2004 10:04:26 -0500, Ramon Misho <Ramon.Misho@teranet.ca> wrote:
>  
>  
> 
> Hello IBATIS Support 
> 
> In my XML file, I need to use a combination of  #value#,  like  and '%'.    
> For example, if I want all information about users whose first names start
> with a specific letter 
> 
> (say M),  I could write the following statement: 
> 
> Select * from users_table where user_first_name like 'M%' 
> 
>   
> 
> However,  if the letter is stored in #value# then I might consider writing
> the following statement (which is NOT working) 
> 
>             Select * from users_table where user_first_name like '#value#%' 
> 
>   
> 
> My question is:  How does IBATIS handle this situation and how do I make
> such Select statement work? 
> 
>   
> 
>   
> 
> Thanks a lot. 
> 
>   
> 
>   
> 
>   
> 
> Ramon Misho 
> 
> System Analyst / Programmer 
> 
> Mapping Development 
> 
>   
> 
> Teranet Inc. 
> 
> 655 Bay Street, Suite 600 
> 
> Toronto, ON M5G 2K4 
> 
>   
> 
> Phone 416.326.1322 ext 4150 
> 
> Fax 416.314.6140 
> 
> e-mail: ramon.misho@teranet.ca 
> 
> Website: http://www.teranet.ca/ 
> 
>   
> 
> The information in this e-mail is confidential and may be legally
> privileged.  It is intended solely for the addressee.  Access to this e-mail
> by anyone else is unauthorized.  If you are not the intended recipient, any
> disclosure, copying, distribution or any action taken or omitted to be taken
> in reliance on it, is prohibited and may be unlawful. 
> 
>

Mime
View raw message