Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Order by in is not giving exact sorted reults in JPA

996208Mar 12 2013 — edited Mar 14 2013
Hi I have wrote a query in sql server like --> Select * from table order by columnName asc

here I am getting records starting with 'AA' eg: AA i dont know why it is coming, but after searching some forums i have got a solution like

select * from tablename order by lower(columnName) Collate SQL_Latin1_General_CP850_BIN asc

is is giving correct results to me, but i nned to write this syntax in JPA , when apply collate syntax in JPA query it is not supprting

JPA query:
this.createQuery(select * from tableaName t order by lower(t.columnname) collate SQL_Latin1_General_CP850_BIN asc).getResultList();

Can some one give me some suggessitions how this collate work exactly and how to appy this in JPA query.


Thanks in Advance :)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 11 2013
Added on Mar 12 2013
4 comments
2,770 views