mmanickaraj wrote:
Hi everybody,
I have an SQL query like
select cu1.last_name from content_user cu1
where lower(cu1.last_name) like lower('%gupta%');
. How can I convert this into HQL query like the following
select cu from com.manic.ContentUser cu where cu.lastName = lower(:lastName).......
Here I want to use the "like" condition for %guta% format.
THanks in advance
Hi,
You can use something like following HQL query :
select cu.last_name from com.manic.ContentUser as cu where lcase(cu.last_name ) like '%gupta%'