• Post Reply Bookmark Topic Watch Topic
  • New Topic

HQL like clause

 
L Ld
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I've been trying to get Users with their lastnames beginning with a string parameter (alpha), but this request doesn't work :



Any ideas ?
 
Rahul Babbar
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the SQL which is generated.

I am pretty sure you have not used the '%' in your String parameter alpha (whether prefixed, suffixed or both) according to your requirements leading to this.

 
L Ld
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I found the solution (using concat) :

 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!