ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <eloy.garci...@accenture.com>
Subject Re: How to obtain results looking for a NULL
Date Fri, 20 May 2005 08:19:57 GMT
 
I want that:
	
#1
	if ParameterClass:
		object.setA("");
		object.setB("VALUE B");
	
	then Statement:
	SELECT * FROM TABLE WHERE A="" AND B="VALUE B"

#2
		
	if ParameterClass:
		//object.setA("");   /** Commmented **/
		object.setB("VALUE B");
	
	then Statement:
	SELECT * FROM TABLE WHERE A IS NULL AND B="VALUE B"
	
	Not this statement. if I use the tag <isnotempty> iBatis put ""
instead IS NULL
	SELECT * FROM TABLE WHERE A="" AND B="VALUE B"


>Re: How to obtain results looking for a NULL
>Brandon Goodin
>Fri, 06 May 2005 13:34:00 -0700
>Then i'm not completely sure what you are asking for. Write out your
>SQL statement in it's most complex form without tags. Just write
>straight SQL. If you do that i think i'll understand what you are
>wanting.

>Brandon

On 5/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>  
> To Brandon Goodin 
>   
> The prepend="OR" doesn't works; and I don't want the next: 
> Example: A='2' B=null 
> SELECT A, B FROM ME  
>     WHERE A='2' 
>             OR B IS NULL 
> I want AND, and then B='3' (for example) or B IS NULL. 
>   
> Thanks for the answer. 
>   
>   
> To Brice Ruth 
>   
> I don't try that, but I supose yes. How can that case be connected
with my
> problem? 
>   
> Thanks for your answer too.
>  
>   
>   
>   
>   
>  
>  
> 
> 
> 
> 
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise private information. If you have
> received it in error, please notify the sender immediately and delete
the
> original. Any other use of the email by you is prohibited.



This message is for the designated recipient only and may contain privileged, proprietary,
or otherwise private information.  If you have received it in error, please notify the sender
immediately and delete the original.  Any other use of the email by you is prohibited.

Mime
View raw message