Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.0
Hi All,
I want to use cast in order by. Ex:
order by cast (step_num as number)
step_num is a varchar2 column and I need to fetch records using order by clause, casting that column to number.
Can any one tell me how to achieve this in hibernate using one of the following options.
1)
addOrder(Order.asc("step_num")) (Adding an order clause to createCriteria)
2) OR using hql. Ex:
From table_1 ORDER BY ....
Thanks in Advance,
Zombie