我已将一个int值数组作为表类型传递给存储过程。根据各个值,我必须通过迭代表类型值在数据库中执行一些操作。
如果有人能对这件事情有所了解,我将不胜感激。我正在考虑将光标作为最后一个选项。任何建议都将受到高度赞赏。
请在下面找到示例SP代码,
SubIds Type,
DateCreated DateTime,
Declare Id Int
//
Have to iterate here to get one id at a time from SubIds
Set Id = // have to get from the SubIds based on the iteration
// With the Id I have to so series of operations like
// retrieving some values, compare, calculate and insert the
// calculated values in some table
// End of iteration
由于