Just change your prepend to an OR when searching for NULL.

<isNull prepend="OR" property="B"> B IS NULL </isNull> 

On 4/29/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>  
> Hello; 
>   
> I'm trying to get results from a table, but I can't search for a col = null
> or col = 'value'. 
>   
>   
> This is my sqlmap statement. 
>   
>   
>  
> 
> <statement id="getME" parameterClass="com.MEQuery"
> resultClass="com.MEQuery"> 
> 
> SELECT A, B FROM ME 
> 
> <dynamic prepend="WHERE"> 
> 
> <isNotEmpty prepend="AND" property="A"> A = #A#</isNotEmpty> 
> 
> <isNotEmpty prepend="AND" property="B">B = #B#</isNotEmpty> 
> 
> <isNull prepend="AND" property="B"> B IS NULL </isNull> 
> 
> </dynamic> 
> 
> </statement> 
>   
>   
>   
> Anybody can help me? 
> Thanks. 
>   
>  
> Eloy García-Borreguero Melero 
> CustomerWorks Europe S.L. 
>  
>  
>  
> [EMAIL PROTECTED] 
>  
> Tlf. 944 06 22 00 (Ext. 439) 
>  
> Tlf. 944 04 17 32 
>  
> 
> 
> 
> 
> 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.

Reply via email to