|case insensitive "order by" [message #496212]
||Mon, 09 November 2009 06:34
Registered: September 2009
I am using eclipse link 1.1.2 version.
I have to perform case insensitive sorting. I sql I can write query like:
select * from tenant order by upper(name) asc;
but we I try to write euivalent JPQL query:
select tenant from TenantEntity tenant order by upper(tenant .name) asc;
i got exception:
java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager
"syntax error at [upper]."
but upper is working for where claue.
So I can write query like:
select tenant from TenantEntity tenant where upper(tenant.name) like 'G%"
but not with order by.
My question is: Does "order by" not supporting upper\lower function? If not how can I achieve it?
Thanks in advance.
Powered by FUDForum
. Page generated in 0.01738 seconds