• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HQL Query that retrieves data without case sensitivity

 
Ramesh Etta
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

my requirement is like this
I had an emp table where it contains empno,empname, etc
now i write a query which fetches data using where clause of empname, which is like this

from emp e where e.empname='f%'

The above query only retrieves the emp records whose name starts with f ( small f not a cap f)

Now my requirement is i need to write a query where it also retrieves the empname records which starts with F (cap f) also.

Hope you got my problem.

please reply.

I came to know that i can use Criteria for this. But i want to use only hql query.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about this:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic