Hi at all.
I need to set a where condition to obtain the follow SQL statement
select to_char(insert_date,'MM'),count(*) from rs_requests
group by to_char(insert_date,'MM')
In other words I need to count the number of requests per month.
(insert_date is a Timestamp field mapped to insertDate property of Request class)
Hiberante version:
select to_char(insertDate,'MM'), count(*) from Request
group by to_char(insertDate,'MM')
The problem of this solution is that it uses Oracle to_char function so with other database it won't be executed....
How could I obtain the same SQL beahavior that go on different databases ?
Thank you
_________________ Ing. Marco Rinaldi - Italy
|