• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use IN Clause in HQL

 
Murali Charan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am new to hibernate. My project already has hibernate implementation. I have introduce a new query which should use a IN clause.

For E.g.,

SELECT * FROM FEATURE WHERE FEATURE_NAME IN ('TAX','GEO_CODE');

I will be getting the values in the IN clause in a collection in my code.
How should i pass the value to the HQL query?
How will the HQL query look like?

Thanks,
Balaji
 
Arun Kumarr
Ranch Hand
Posts: 661
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Here subTotalVariable is an Object.

lest you can use something like this,

 
Ram Subramanian
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works great. Good work dude.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic