过程在SQL Server中采用数组参数? [英] procedure take array parameter in sql server?

查看:121
本文介绍了过程在SQL Server中采用数组参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我如何创建过程在
中使用数组参数 sql server 2005

感谢您的帮助

hi everyone
how i can create procedure take array parameter in
sql server 2005

thanks for any help

推荐答案

查看此处:
MS H& S:如何使用XML和Visual Basic .NET将值的数组传递到SQL Server存储过程中 [ ^ ]
如何将值列表或数组传递给SQL Server存储过程? [
Look here:
MS H&S: How to pass array of values into SQL Server stored procedure using XML and Visual Basic .NET[^]
How to pass a list of values or array to SQL Server stored procedure?[^]


这种情况通常通过传递定界字符串"1,2,3,4,然后使用字符串处理方法将其解析为存储的proc中的单个组件.有很多示例.

如果可以使用的话,另一种方法是创建一个.net管理的存储proc,因为.net当然比tsql具有更好的字符串操作功能
This situation is usually handled by passing a delimited string, "1,2,3,4" then parsing it into inividual components in the stored proc with string handling methods. There are good number of examples for this.

Another method, if you can use it, is to created a .net managed stored proc since .net of course has better string manipulation capabilities than tsql


Google是您的朋友:友好并访问他经常.与在这里发布问题相比,他可以更快地回答问题.
例如,我将您的问题主题反馈给Google,并在此网站上建议了这篇文章:

存储过程中的数组参数处理 [
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...
For example, I fed your question subject into Google and it suggested this article on this site:

Array Parameter Handling in a Stored Procedure[^]

Now, why couldn''t you do that?


这篇关于过程在SQL Server中采用数组参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆