0
votes

I have to execute a query where there are multiple attributes in where clause and we have multiple such requests. eg. we have to execute below query

Select * 
from Equipments 
where equipId=? 
  and equipType=?

I have 1000s of set of these values like (1000,wireless),(2000,wire) . . . . Which means i want to execute multiple select statements like

Select *  
from Equipments 
where equipId=1000  
and equipType='wireless'

Select * 
from  Equipments 
where equipId=2000  
and equipType='wire'

how can i run this select statement in bulk and get the list of java Object mapped to Equipments table, instead of making one select at a time and going in loop .

1

1 Answers

0
votes

While doing research on this, i found this and modified my query accordingly and i am able to do multiple select. There is one limitation still left that in the 'in' clause we have a limitation on number of parameters being passed. If some someone know of that solution please comment