ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikesh, Kishlay" <kishlay.nik...@fidelity.co.in>
Subject RE: sysdate comparison issue
Date Wed, 26 Jul 2006 06:02:27 GMT
Thanks Aram ! It works..
 
Regards,
Nikesh

-----Original Message-----
From: Mkhitaryan, Aram [mailto:Aram.Mkhitaryan@lycos-europe.com] 
Sent: 26 July 2006 10:37
To: user-java@ibatis.apache.org
Subject: RE: sysdate comparison issue



Use this way:

   <select id="getUserDetails" resultClass="valueObject"
parameterClass="valueObject"> 

<![CDATA[
            SELECT 
            column1, column2 
            FROM  app_table_name 
            WHERE 
            (SYSDATE > #property1#) 
            AND 
            (SYSDATE < #property2#)  
            AND 
            TABLE_ID = #property3# 

]]>
        </select>

 

< and > are xml characters. If you want to write this kind of letters user
<![CDATA[ ]]> sections or just use &lt; and &gt;

 

Best,

Aram

 


  _____  


From: Nikesh, Kishlay [mailto:kishlay.nikesh@fidelity.co.in] 
Sent: Wednesday, July 26, 2006 9:51 AM
To: user-java@ibatis.apache.org
Subject: sysdate comparison issue

 

Hi, 

I am trying to execute the below query through iBatis - 

        <select id="getUserDetails" resultClass="valueObject"
parameterClass="valueObject"> 
            SELECT 
            column1, column2 
            FROM  app_table_name 
            WHERE 
            (SYSDATE > #property1#) 
            AND 
            (SYSDATE < #property2#)  
            AND 
            TABLE_ID = #property3# 
        </select> 

It doesn't allow me using < and > in my queries and gives compilation
problems. 
I tried using isLessThan and isGreaterThan as demonstrated in the tutorial,
but wasn't able to do so. 

Can anyone please help me on how to define the above query in my iBatis sql
mapping xml ? 

Thanks in advance, 
Nikesh 


Mime
View raw message