EJB QL - selecting current year in date type
Posted on 2010-03-25
I am working on jboss seam web app and I need to modifiy ejb ql so that I can use same code next year without modifying code.
select qualReport from QualReport qualReport where qualReport.countyName='cherokee' order by qualReport.quarter, qualReport.rowOrder
The above works fine, but I want to select rows only for current year. There is a createdDate column that stores oracle Date when rows were inserted and there are some rows that were created this year.