I have a list of different ids and their names. For every id[0]
we have name[0]
that needs to be matched.
- list of ids,
l{1,2,3,4};
- list of names,
n{a,b,c,d};
Now suppose if I want to get an exact match for both above combination, is there any way in HQL to get the result?
I am looking to find a replacement for a query like:
select any_column
from table_name
where (id[0]=1 and name[0]=a) or (id[1]=2 and name[1]=b and so on...);
The HQL query should be something like below:
select any_column
from table_name
where (id,name) IN {(id[0],name[0]), (id[1], name[1]),...};
Any suggestions?