ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Kron <erik_k...@yahoo.com>
Subject SQL query with "greater and equal" and "less and equal"
Date Sun, 22 Jan 2006 20:29:04 GMT
I have a table called rawattendancerecord.

There is a column in the table called logDate;

I want to be able to return log dates between 2 give
search date criteria. E.g. dates between fromDate and

I can do a search from the command line (mysql) with
the following commands to return the right values.

select * from rawattendancerecord where
logDate>='2005-10-10' and logDate<='2006-01-15';

How can I represent a similar query in ibatis?

In my RawAttendanceRecord.xml: (I am passing my search
range (from and to value) with fromDate to toDate
(properties) in the searchAttendanceRecords class.

<select id="getRawAttendanceRecordListRange"
    select * from RAWATTENDANCERECORD where ...


I just do not know the syntax to use. I have read
about <isGreaterEqual> and <isLessEqual>. But I cannot
seem to be able to use them appropriately.

Any help will be appreciated. I tried to search the
FAQ section, but the site is currently down.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

View raw message