I want to pass a number of Integers into a Stored Procedure that I can use in a query of the stored procedure. I am trying to figure out the best way to do this.
The Query is something like this:
Select * from xtable where id in (IDList)
I want to be able to pass 1-x ID's into the Stored Procedure.
I would love to be able to Do a CALL SPx(123,222,444,555)
and place that in the IDList, however th eIDList has to be a list of Integers. Or I could have a separate IN parameter for each possible ID and combine them, but I am not sure how to combine thme into a single element (IDList) withth ecorrect data type. I also may have a variable number of IDs I want to pass so I don't really want to have 100 IN paramenters when I may only enter two.
I hope this is clear. thanks for any help
The Query is something like this:
Select * from xtable where id in (IDList)
I want to be able to pass 1-x ID's into the Stored Procedure.
I would love to be able to Do a CALL SPx(123,222,444,555)
and place that in the IDList, however th eIDList has to be a list of Integers. Or I could have a separate IN parameter for each possible ID and combine them, but I am not sure how to combine thme into a single element (IDList) withth ecorrect data type. I also may have a variable number of IDs I want to pass so I don't really want to have 100 IN paramenters when I may only enter two.
I hope this is clear. thanks for any help