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
toDate.


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

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"
resultMap="rawAttendanceRecordResult"
parameterClass="searchAttendanceRecords">
    select * from RAWATTENDANCERECORD where ...

  </select>

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.

Regards,
Erik

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Mime
View raw message