Hi,
JDBC 3.0 implements a feature called "Escape Syntax": Something like
{foo FUNCTION()}
to set in your SQL statement. It provides you with the ability to access
database specific functions in a general, database-independent way.
You will find further information in the JDBC 3.0 spec, chapter 13.4 and
appendix C (especially appendix C3 "Time and Date Functions"):
http://java.sun.com/products/jdbc/download.html#corespec30
Getting current system timestamp works like this:
select * from TABLE where TIMESTAMP_FIELD < {fn CURTIME()}
Or with current date:
insert into TABLE (VARCHAR_FIELD, DATE_FIELD) values ('Some characters',
{fn CURDATE()})
Checking support of this feature by your JDBC driver is possible via
java.sql.DataBaseMetaData.getTimeDateFunctions().
Hopefully your vendor supports it.
Greetings
Christian Möller