Hi,
I have a column with data as "YYYYMMDD" - "20130101" and I am trying to use Criteria to group by this column.
But I should group by year alone, which is substring of the column.
I am able to achieve this using Projections.sqlGroupProjection(substr(SERVICE_PERIOD,1,4) -- Here SERVICE_PERIOD column holds data like 20130101 and my query should group by this column by year alone.
Please let me know is there any other better way to achieve this without using sqlGroupProjection.
Thanks. Ram Mohan.
_________________ Thanks, Ram Mohan
|