How to use less than equal to and greater than equal to in query

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

How to use less than equal to and greater than equal to in query

sapandiwakar
Hello,

I am comparing date for which I am using

"DATEOCCUR > #{fromdate}"  and "DATEOCCUR < #{todate}" but I
want greater than equal to instead of greater than and less than equal
to instead of less than.

in short-

<  &lt;
> &gt;

and for
>= ?
<= ?
Reply | Threaded
Open this post in threaded view
|

Re: How to use less than equal to and greater than equal to in query

Clinton Begin
Administrator
Please post all questions to the mailing list.

On Wed, Jul 6, 2011 at 5:41 AM, Sapan <[hidden email]> wrote:
Hello,

I am comparing date for which I am using

"DATEOCCUR &gt; #{fromdate}"  and "DATEOCCUR &lt; #{todate}" but I
want greater than equal to instead of greater than and less than equal
to instead of less than.

in short-

<  &lt;
> &gt;

and for
>= ?
<= ?

Reply | Threaded
Open this post in threaded view
|

Re: How to use less than equal to and greater than equal to in query

François Schiettecatte
"DATEOCCUR >&gt; #{fromdate}"

"DATEOCCUR <&lt; #{fromdate}"


On Jul 6, 2011, at 1:32 PM, Clinton Begin wrote:

> Please post all questions to the mailing list.
>
> On Wed, Jul 6, 2011 at 5:41 AM, Sapan <[hidden email]> wrote:
> Hello,
>
> I am comparing date for which I am using
>
> "DATEOCCUR &gt; #{fromdate}"  and "DATEOCCUR &lt; #{todate}" but I
> want greater than equal to instead of greater than and less than equal
> to instead of less than.
>
> in short-
>
> <  &lt;
> > &gt;
>
> and for
> >= ?
> <= ?
>

Reply | Threaded
Open this post in threaded view
|

Re: How to use less than equal to and greater than equal to in query

Clinton Begin
Administrator
In reply to this post by Clinton Begin
Sorry, my bad, this is the mailing list!!!!! For some reason it showed up in my personal inbox.  

Apologies.  


You should be able to do:  &gt;=

But that starts to look hideous.  So if your query is otherwise simple, and does NOT use dynamic SQL elements, you might prefer a CDATA section...


<![CDATA[
"DATEOCCUR >= #{fromdate}"  and "DATEOCCUR <= #{todate}" 
]]>

On Wed, Jul 6, 2011 at 11:32 AM, Clinton Begin <[hidden email]> wrote:
Please post all questions to the mailing list.


On Wed, Jul 6, 2011 at 5:41 AM, Sapan <[hidden email]> wrote:
Hello,

I am comparing date for which I am using

"DATEOCCUR &gt; #{fromdate}"  and "DATEOCCUR &lt; #{todate}" but I
want greater than equal to instead of greater than and less than equal
to instead of less than.

in short-

<  &lt;
> &gt;

and for
>= ?
<= ?


Reply | Threaded
Open this post in threaded view
|

Re: How to use less than equal to and greater than equal to in query

François Schiettecatte
In reply to this post by François Schiettecatte
Actually there was a typo:

"DATEOCCUR &gt;= #{fromdate}"
"DATEOCCUR &lt;= #{fromdate}"

This also works which is what I use:

"DATEOCCUR <![CDATA[ >= ]]> #{fromdate}"
"DATEOCCUR <![CDATA[ <= ]]> #{fromdate}"

François


On Jul 6, 2011, at 1:34 PM, François Schiettecatte wrote:

> "DATEOCCUR &gt=; #{fromdate}"
>
> "DATEOCCUR <&lt;= #{fromdate}"
>
>
> On Jul 6, 2011, at 1:32 PM, Clinton Begin wrote:
>
>> Please post all questions to the mailing list.
>>
>> On Wed, Jul 6, 2011 at 5:41 AM, Sapan <[hidden email]> wrote:
>> Hello,
>>
>> I am comparing date for which I am using
>>
>> "DATEOCCUR &gt; #{fromdate}"  and "DATEOCCUR &lt; #{todate}" but I
>> want greater than equal to instead of greater than and less than equal
>> to instead of less than.
>>
>> in short-
>>
>> <  &lt;
>>> &gt;
>>
>> and for
>>> = ?
>> <= ?
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to use less than equal to and greater than equal to in query

Clinton Begin
Administrator
For readability you can put the entire thing in a CDATA section.  As long as you're not using any dynamic SQL... 

Clinton

2011/7/6 François Schiettecatte <[hidden email]>
Actually there was a typo:

"DATEOCCUR &gt;= #{fromdate}"
"DATEOCCUR &lt;= #{fromdate}"

This also works which is what I use:

"DATEOCCUR <![CDATA[ >= ]]> #{fromdate}"
"DATEOCCUR <![CDATA[ <= ]]> #{fromdate}"

François


On Jul 6, 2011, at 1:34 PM, François Schiettecatte wrote:

> "DATEOCCUR &gt=; #{fromdate}"
>
> "DATEOCCUR <&lt;= #{fromdate}"
>
>
> On Jul 6, 2011, at 1:32 PM, Clinton Begin wrote:
>
>> Please post all questions to the mailing list.
>>
>> On Wed, Jul 6, 2011 at 5:41 AM, Sapan <[hidden email]> wrote:
>> Hello,
>>
>> I am comparing date for which I am using
>>
>> "DATEOCCUR &gt; #{fromdate}"  and "DATEOCCUR &lt; #{todate}" but I
>> want greater than equal to instead of greater than and less than equal
>> to instead of less than.
>>
>> in short-
>>
>> <  &lt;
>>> &gt;
>>
>> and for
>>> = ?
>> <= ?
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: How to use less than equal to and greater than equal to in query

François Schiettecatte
Clinton

Very good point, I have gotten used to just scanning over the CDATA markup :)

Thanks

François

On Jul 6, 2011, at 1:41 PM, Clinton Begin wrote:

> For readability you can put the entire thing in a CDATA section.  As long as you're not using any dynamic SQL...
>
> Clinton
>
> 2011/7/6 François Schiettecatte <[hidden email]>
> Actually there was a typo:
>
> "DATEOCCUR &gt;= #{fromdate}"
> "DATEOCCUR &lt;= #{fromdate}"
>
> This also works which is what I use:
>
> "DATEOCCUR <![CDATA[ >= ]]> #{fromdate}"
> "DATEOCCUR <![CDATA[ <= ]]> #{fromdate}"
>
> François
>
>
> On Jul 6, 2011, at 1:34 PM, François Schiettecatte wrote:
>
> > "DATEOCCUR &gt=; #{fromdate}"
> >
> > "DATEOCCUR <&lt;= #{fromdate}"
> >
> >
> > On Jul 6, 2011, at 1:32 PM, Clinton Begin wrote:
> >
> >> Please post all questions to the mailing list.
> >>
> >> On Wed, Jul 6, 2011 at 5:41 AM, Sapan <[hidden email]> wrote:
> >> Hello,
> >>
> >> I am comparing date for which I am using
> >>
> >> "DATEOCCUR &gt; #{fromdate}"  and "DATEOCCUR &lt; #{todate}" but I
> >> want greater than equal to instead of greater than and less than equal
> >> to instead of less than.
> >>
> >> in short-
> >>
> >> <  &lt;
> >>> &gt;
> >>
> >> and for
> >>> = ?
> >> <= ?
> >>
> >
>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to use less than equal to and greater than equal to in query

Clinton Begin
Administrator
This reminds me... A while back I think I suggested adding some tags or other tokens... like:


<eq/>
<gteq/>
<lteq/>
<neq/>

The other benefit is that the eq tags could take a paramter reference like:

<eq isNull="blah"/>

So if blah is null, then it will insert IS NULL rather than =

Thoughts?

Clinton


2011/7/6 François Schiettecatte <[hidden email]>
Clinton

Very good point, I have gotten used to just scanning over the CDATA markup :)

Thanks

François

On Jul 6, 2011, at 1:41 PM, Clinton Begin wrote:

> For readability you can put the entire thing in a CDATA section.  As long as you're not using any dynamic SQL...
>
> Clinton
>
> 2011/7/6 François Schiettecatte <[hidden email]>
> Actually there was a typo:
>
> "DATEOCCUR &gt;= #{fromdate}"
> "DATEOCCUR &lt;= #{fromdate}"
>
> This also works which is what I use:
>
> "DATEOCCUR <![CDATA[ >= ]]> #{fromdate}"
> "DATEOCCUR <![CDATA[ <= ]]> #{fromdate}"
>
> François
>
>
> On Jul 6, 2011, at 1:34 PM, François Schiettecatte wrote:
>
> > "DATEOCCUR &gt=; #{fromdate}"
> >
> > "DATEOCCUR <&lt;= #{fromdate}"
> >
> >
> > On Jul 6, 2011, at 1:32 PM, Clinton Begin wrote:
> >
> >> Please post all questions to the mailing list.
> >>
> >> On Wed, Jul 6, 2011 at 5:41 AM, Sapan <[hidden email]> wrote:
> >> Hello,
> >>
> >> I am comparing date for which I am using
> >>
> >> "DATEOCCUR &gt; #{fromdate}"  and "DATEOCCUR &lt; #{todate}" but I
> >> want greater than equal to instead of greater than and less than equal
> >> to instead of less than.
> >>
> >> in short-
> >>
> >> <  &lt;
> >>> &gt;
> >>
> >> and for
> >>> = ?
> >> <= ?
> >>
> >
>
>


Reply | Threaded
Open this post in threaded view
|

Re: How to use less than equal to and greater than equal to in query

Ingmar Lötzsch
Hello,

I'am using iBATIS 2 with Spring 2.5 and PostgreSQL 8. I'am avoiding
CDATA sections and xml-Entities like &gt; by defining the order of the
operands of an equation so, that I can use ">" instead of "<". I'am
working on a project with 350 tables and over 1000 SQL statements and
there isn't any CDATA section and (unfortunately) 2 occurrences of
"&amp;" for some exotic bit operation with non normalized data.

Ingmar


Am 06.07.2011 20:22, schrieb Clinton Begin:

> This reminds me... A while back I think I suggested adding some tags
> or other tokens... like:
>
>
> <eq/>
> <gteq/>
> <lteq/>
> <neq/>
>
> The other benefit is that the eq tags could take a paramter reference
> like:
>
> <eq isNull="blah"/>
>
> So if blah is null, then it will insert IS NULL rather than =
>
> Thoughts?
>
> Clinton
>
>
> 2011/7/6 François Schiettecatte <[hidden email]
> <mailto:[hidden email]>>
>
>     Clinton
>
>     Very good point, I have gotten used to just scanning over the
>     CDATA markup :)
>
>     Thanks
>
>     François
>
>     On Jul 6, 2011, at 1:41 PM, Clinton Begin wrote:
>
>     > For readability you can put the entire thing in a CDATA section.
>      As long as you're not using any dynamic SQL...
>     >
>     > Clinton
>     >
>     > 2011/7/6 François Schiettecatte <[hidden email]
>     <mailto:[hidden email]>>
>     > Actually there was a typo:
>     >
>     > "DATEOCCUR &gt;= #{fromdate}"
>     > "DATEOCCUR &lt;= #{fromdate}"
>     >
>     > This also works which is what I use:
>     >
>     > "DATEOCCUR <![CDATA[ >= ]]> #{fromdate}"
>     > "DATEOCCUR <![CDATA[ <= ]]> #{fromdate}"
>     >
>     > François
>     >
>     >
>     > On Jul 6, 2011, at 1:34 PM, François Schiettecatte wrote:
>     >
>     > > "DATEOCCUR &gt=; #{fromdate}"
>     > >
>     > > "DATEOCCUR <&lt;= #{fromdate}"
>     > >
>     > >
>     > > On Jul 6, 2011, at 1:32 PM, Clinton Begin wrote:
>     > >
>     > >> Please post all questions to the mailing list.
>     > >>
>     > >> On Wed, Jul 6, 2011 at 5:41 AM, Sapan
>     <[hidden email] <mailto:[hidden email]>> wrote:
>     > >> Hello,
>     > >>
>     > >> I am comparing date for which I am using
>     > >>
>     > >> "DATEOCCUR &gt; #{fromdate}"  and "DATEOCCUR &lt; #{todate}"
>     but I
>     > >> want greater than equal to instead of greater than and less
>     than equal
>     > >> to instead of less than.
>     > >>
>     > >> in short-
>     > >>
>     > >> < &lt;
>     > >>> &gt;
>     > >>
>     > >> and for
>     > >>> = ?
>     > >> <= ?
>     > >>
>     > >
>     >
>     >
>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to use less than equal to and greater than equal to in query

Ingmar Lötzsch
... and there are 131 occurrences of ">" or ">=".
Reply | Threaded
Open this post in threaded view
|

Re: How to use less than equal to and greater than equal to in query

François Schiettecatte
In reply to this post by Clinton Begin
Clinton

I wanted to think about this before responding, I think we would need to create some use cases to see how this would help, for example, I have a lot of mappings that contain code like this:

                <where>
                        <if test="epochAddedLT != null">
                                <![CDATA[ AND epoch_added <= #{epochAddedLT} ]]>
                        </if>
                        <if test="epochAddedGT != null">
                                <![CDATA[ AND epoch_added >= #{epochAddedGT} ]]>
                        </if>
                        <if test="epochPublishedLT != null">
                                <![CDATA[ AND epoch_published <= #{epochPublishedLT} ]]>
                        </if>
                        <if test="epochPublishedGT != null">
                                <![CDATA[ AND epoch_published >= #{epochPublishedGT} ]]>
                        </if>
                        <if test="epochUpdatedLT != null">
                                <![CDATA[ AND epoch_updated <= #{epochUpdatedLT} ]]>
                        </if>
                        <if test="epochUpdatedGT != null">
                                <![CDATA[ AND epoch_updated >= #{epochUpdatedGT} ]]>
                        </if>
                        <if test="statusID != null">
                                AND status_id = #{statusID}
                        </if>
                </where>

Which is ugly but functional, how would your suggestion help here ?

Cheers

François



On Jul 6, 2011, at 2:22 PM, Clinton Begin wrote:

> This reminds me... A while back I think I suggested adding some tags or other tokens... like:
>
>
> <eq/>
> <gteq/>
> <lteq/>
> <neq/>
>
> The other benefit is that the eq tags could take a paramter reference like:
>
> <eq isNull="blah"/>
>
> So if blah is null, then it will insert IS NULL rather than =
>
> Thoughts?
>
> Clinton
>
>
> 2011/7/6 François Schiettecatte <[hidden email]>
> Clinton
>
> Very good point, I have gotten used to just scanning over the CDATA markup :)
>
> Thanks
>
> François
>
> On Jul 6, 2011, at 1:41 PM, Clinton Begin wrote:
>
> > For readability you can put the entire thing in a CDATA section.  As long as you're not using any dynamic SQL...
> >
> > Clinton
> >
> > 2011/7/6 François Schiettecatte <[hidden email]>
> > Actually there was a typo:
> >
> > "DATEOCCUR &gt;= #{fromdate}"
> > "DATEOCCUR &lt;= #{fromdate}"
> >
> > This also works which is what I use:
> >
> > "DATEOCCUR <![CDATA[ >= ]]> #{fromdate}"
> > "DATEOCCUR <![CDATA[ <= ]]> #{fromdate}"
> >
> > François
> >
> >
> > On Jul 6, 2011, at 1:34 PM, François Schiettecatte wrote:
> >
> > > "DATEOCCUR &gt=; #{fromdate}"
> > >
> > > "DATEOCCUR <&lt;= #{fromdate}"
> > >
> > >
> > > On Jul 6, 2011, at 1:32 PM, Clinton Begin wrote:
> > >
> > >> Please post all questions to the mailing list.
> > >>
> > >> On Wed, Jul 6, 2011 at 5:41 AM, Sapan <[hidden email]> wrote:
> > >> Hello,
> > >>
> > >> I am comparing date for which I am using
> > >>
> > >> "DATEOCCUR &gt; #{fromdate}"  and "DATEOCCUR &lt; #{todate}" but I
> > >> want greater than equal to instead of greater than and less than equal
> > >> to instead of less than.
> > >>
> > >> in short-
> > >>
> > >> <  &lt;
> > >>> &gt;
> > >>
> > >> and for
> > >>> = ?
> > >> <= ?
> > >>
> > >
> >
> >
>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to use less than equal to and greater than equal to in query

Clinton Begin
Administrator
It would be a bit cleaner, although not idiomatic, as below.

However, in your case, the logic required states "if it's null, don't search for anything".  My second point was that in the event that you want to search for the value of a column, even if it's null (which is not a value technically), you could allow the <eq/> tag to automatically insert = or IS, depending on the value or null... 

I've changed your last condition to reflect what that would look like:

<where>
  <if test="epochAddedLT != null">
  AND epoch_added <lteq/> #{epochAddedLT}
  </if>
  <if test="epochAddedGT != null">
  AND epoch_added <gteq/> #{epochAddedGT} ]]>
  </if>
  <if test="epochPublishedLT != null">
  AND epoch_published <lteq/> #{epochPublishedLT}
  </if>
  <if test="epochPublishedGT != null">
  AND epoch_published <gteq/> #{epochPublishedGT}
  </if>
  <if test="epochUpdatedLT != null">
  AND epoch_updated <lteq/> #{epochUpdatedLT}
  </if>
  <if test="epochUpdatedGT != null">
  AND epoch_updated <gteq/> #{epochUpdatedGT}
  </if>
   
  AND status_id <eq nullable="statusID"/> #{statusID}
     
</where>

For example, the last condition could be rendered out as either:

  AND status_id = 599
or
  AND status_id IS NULL

Depending on whether statusID was null or not.

Cheers,
Clinton

2011/7/7 François Schiettecatte <[hidden email]>
Clinton

I wanted to think about this before responding, I think we would need to create some use cases to see how this would help, for example, I have a lot of mappings that contain code like this:

               <where>
                       <if test="epochAddedLT != null">
                               <![CDATA[ AND epoch_added <= #{epochAddedLT} ]]>
                       </if>
                       <if test="epochAddedGT != null">
                               <![CDATA[ AND epoch_added >= #{epochAddedGT} ]]>
                       </if>
                       <if test="epochPublishedLT != null">
                               <![CDATA[ AND epoch_published <= #{epochPublishedLT} ]]>
                       </if>
                       <if test="epochPublishedGT != null">
                               <![CDATA[ AND epoch_published >= #{epochPublishedGT} ]]>
                       </if>
                       <if test="epochUpdatedLT != null">
                               <![CDATA[ AND epoch_updated <= #{epochUpdatedLT} ]]>
                       </if>
                       <if test="epochUpdatedGT != null">
                               <![CDATA[ AND epoch_updated >= #{epochUpdatedGT} ]]>
                       </if>
                       <if test="statusID != null">
                               AND status_id = #{statusID}
                       </if>
               </where>

Which is ugly but functional, how would your suggestion help here ?

Cheers

François



On Jul 6, 2011, at 2:22 PM, Clinton Begin wrote:

> This reminds me... A while back I think I suggested adding some tags or other tokens... like:
>
>
> <eq/>
> <gteq/>
> <lteq/>
> <neq/>
>
> The other benefit is that the eq tags could take a paramter reference like:
>
> <eq isNull="blah"/>
>
> So if blah is null, then it will insert IS NULL rather than =
>
> Thoughts?
>
> Clinton
>
>
> 2011/7/6 François Schiettecatte <[hidden email]>
> Clinton
>
> Very good point, I have gotten used to just scanning over the CDATA markup :)
>
> Thanks
>
> François
>
> On Jul 6, 2011, at 1:41 PM, Clinton Begin wrote:
>
> > For readability you can put the entire thing in a CDATA section.  As long as you're not using any dynamic SQL...
> >
> > Clinton
> >
> > 2011/7/6 François Schiettecatte <[hidden email]>
> > Actually there was a typo:
> >
> > "DATEOCCUR &gt;= #{fromdate}"
> > "DATEOCCUR &lt;= #{fromdate}"
> >
> > This also works which is what I use:
> >
> > "DATEOCCUR <![CDATA[ >= ]]> #{fromdate}"
> > "DATEOCCUR <![CDATA[ <= ]]> #{fromdate}"
> >
> > François
> >
> >
> > On Jul 6, 2011, at 1:34 PM, François Schiettecatte wrote:
> >
> > > "DATEOCCUR &gt=; #{fromdate}"
> > >
> > > "DATEOCCUR <&lt;= #{fromdate}"
> > >
> > >
> > > On Jul 6, 2011, at 1:32 PM, Clinton Begin wrote:
> > >
> > >> Please post all questions to the mailing list.
> > >>
> > >> On Wed, Jul 6, 2011 at 5:41 AM, Sapan <[hidden email]> wrote:
> > >> Hello,
> > >>
> > >> I am comparing date for which I am using
> > >>
> > >> "DATEOCCUR &gt; #{fromdate}"  and "DATEOCCUR &lt; #{todate}" but I
> > >> want greater than equal to instead of greater than and less than equal
> > >> to instead of less than.
> > >>
> > >> in short-
> > >>
> > >> <  &lt;
> > >>> &gt;
> > >>
> > >> and for
> > >>> = ?
> > >> <= ?
> > >>
> > >
> >
> >
>
>


Reply | Threaded
Open this post in threaded view
|

Re: How to use less than equal to and greater than equal to in query

François Schiettecatte
Clinton

I agree, it looks cleaner but it feels a little 'clunky' next to the other operators. That being said I would vote for supporting this which would give people a choice in how they code this.

Cheers

François


On Jul 7, 2011, at 12:51 PM, Clinton Begin wrote:

> It would be a bit cleaner, although not idiomatic, as below.
>
> However, in your case, the logic required states "if it's null, don't search for anything".  My second point was that in the event that you want to search for the value of a column, even if it's null (which is not a value technically), you could allow the <eq/> tag to automatically insert = or IS, depending on the value or null...
>
> I've changed your last condition to reflect what that would look like:
>
> <where>
>   <if test="epochAddedLT != null">
>   AND epoch_added <lteq/> #{epochAddedLT}
>   </if>
>   <if test="epochAddedGT != null">
>   AND epoch_added <gteq/> #{epochAddedGT} ]]>
>   </if>
>   <if test="epochPublishedLT != null">
>   AND epoch_published <lteq/> #{epochPublishedLT}
>   </if>
>   <if test="epochPublishedGT != null">
>   AND epoch_published <gteq/> #{epochPublishedGT}
>   </if>
>   <if test="epochUpdatedLT != null">
>   AND epoch_updated <lteq/> #{epochUpdatedLT}
>   </if>
>   <if test="epochUpdatedGT != null">
>   AND epoch_updated <gteq/> #{epochUpdatedGT}
>   </if>
>  
>  AND status_id <eq nullable="statusID"/> #{statusID}
>    
> </where>
>
> For example, the last condition could be rendered out as either:
>
>  AND status_id = 599
> or
>  AND status_id IS NULL
>
> Depending on whether statusID was null or not.
>
> Cheers,
> Clinton
>
> 2011/7/7 François Schiettecatte <[hidden email]>
> Clinton
>
> I wanted to think about this before responding, I think we would need to create some use cases to see how this would help, for example, I have a lot of mappings that contain code like this:
>
>                <where>
>                        <if test="epochAddedLT != null">
>                                <![CDATA[ AND epoch_added <= #{epochAddedLT} ]]>
>                        </if>
>                        <if test="epochAddedGT != null">
>                                <![CDATA[ AND epoch_added >= #{epochAddedGT} ]]>
>                        </if>
>                        <if test="epochPublishedLT != null">
>                                <![CDATA[ AND epoch_published <= #{epochPublishedLT} ]]>
>                        </if>
>                        <if test="epochPublishedGT != null">
>                                <![CDATA[ AND epoch_published >= #{epochPublishedGT} ]]>
>                        </if>
>                        <if test="epochUpdatedLT != null">
>                                <![CDATA[ AND epoch_updated <= #{epochUpdatedLT} ]]>
>                        </if>
>                        <if test="epochUpdatedGT != null">
>                                <![CDATA[ AND epoch_updated >= #{epochUpdatedGT} ]]>
>                        </if>
>                        <if test="statusID != null">
>                                AND status_id = #{statusID}
>                        </if>
>                </where>
>
> Which is ugly but functional, how would your suggestion help here ?
>
> Cheers
>
> François
>
>
>
> On Jul 6, 2011, at 2:22 PM, Clinton Begin wrote:
>
> > This reminds me... A while back I think I suggested adding some tags or other tokens... like:
> >
> >
> > <eq/>
> > <gteq/>
> > <lteq/>
> > <neq/>
> >
> > The other benefit is that the eq tags could take a paramter reference like:
> >
> > <eq isNull="blah"/>
> >
> > So if blah is null, then it will insert IS NULL rather than =
> >
> > Thoughts?
> >
> > Clinton
> >
> >
> > 2011/7/6 François Schiettecatte <[hidden email]>
> > Clinton
> >
> > Very good point, I have gotten used to just scanning over the CDATA markup :)
> >
> > Thanks
> >
> > François
> >
> > On Jul 6, 2011, at 1:41 PM, Clinton Begin wrote:
> >
> > > For readability you can put the entire thing in a CDATA section.  As long as you're not using any dynamic SQL...
> > >
> > > Clinton
> > >
> > > 2011/7/6 François Schiettecatte <[hidden email]>
> > > Actually there was a typo:
> > >
> > > "DATEOCCUR &gt;= #{fromdate}"
> > > "DATEOCCUR &lt;= #{fromdate}"
> > >
> > > This also works which is what I use:
> > >
> > > "DATEOCCUR <![CDATA[ >= ]]> #{fromdate}"
> > > "DATEOCCUR <![CDATA[ <= ]]> #{fromdate}"
> > >
> > > François
> > >
> > >
> > > On Jul 6, 2011, at 1:34 PM, François Schiettecatte wrote:
> > >
> > > > "DATEOCCUR &gt=; #{fromdate}"
> > > >
> > > > "DATEOCCUR <&lt;= #{fromdate}"
> > > >
> > > >
> > > > On Jul 6, 2011, at 1:32 PM, Clinton Begin wrote:
> > > >
> > > >> Please post all questions to the mailing list.
> > > >>
> > > >> On Wed, Jul 6, 2011 at 5:41 AM, Sapan <[hidden email]> wrote:
> > > >> Hello,
> > > >>
> > > >> I am comparing date for which I am using
> > > >>
> > > >> "DATEOCCUR &gt; #{fromdate}"  and "DATEOCCUR &lt; #{todate}" but I
> > > >> want greater than equal to instead of greater than and less than equal
> > > >> to instead of less than.
> > > >>
> > > >> in short-
> > > >>
> > > >> <  &lt;
> > > >>> &gt;
> > > >>
> > > >> and for
> > > >>> = ?
> > > >> <= ?
> > > >>
> > > >
> > >
> > >
> >
> >
>
>