crit.addEqual("date_part('month', mt_date)", new Integer(12) )
should do it. possible problem could occur when parsing the criteria expression. ojb eventually cannot get the attribute-name from the expression.
jakob
Angus Berry wrote:
I wonder if it's possible to construct an OQL Query (or maybe PB) that is the equivalent of this (in PostgreSQL):
select * from tbl_my_table where date_part('month', mt_date) = 12;
This selects all records with the month 12. I guess the alternative in OQL that I'm working with is:
'WHERE >= firstdayofgivenmonth AND <= lastdayofgivenmonth
thanks for any suggestions...
--------------------------------------------------------------------- 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]
