Hi,
I have following delete query.
delete from userid where useraccontno in (1,2,3,4,5);
I am looking for a nice solution to implement above using named query.
Parameters of this queries are the one specified in brackes (1,2,3,4,5), using "in" SQL clause.
For this I am defining above query in .hbm file
<query name="delete">
delete from userid where useraccontno in (:accountNo);
<query>
Now my problem comes while setting the problem for variable "accountNo"
If I set
getnamedQuery("delete").setInteger("accoutNo",1) then it works
but
If I set
getnamedQuery("delete").setString("accoutNo","1,2,3,4") then it doesnt work
Hope I was clear enough to expalin the problem any solution please
Thanks
Sudhir
|