Hi,
personnally, I put :
criteria.addSql("date = TO_DATE('2004', 'yyyy')");

But I think there other possibilities

-----Message d'origine-----
De : Glauber Andrade [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 18 décembre 2003 00:19
À : OJB Users List
Objet : select question (again)


How do I implement a select like this with OJB Criteria ?

select * from <TABLE> where date = TO_DATE('2004','yyyy')             (as on
Oracle)
or
select * from <TABLE> where YEAR(date) = 2004
(as on MySQL)

THANKS,

Glauber Andrade



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to