使用多个值为单个参数执行存储过程

使用多个值为单个参数执行存储过程

本文介绍了使用多个值为单个参数执行存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好

我急需您的帮助。我有一个带有1个参数的存储过程( @code

Hello
I need urgently your help. I have a stored procedure with 1 single parameter (@code)

e.g create PROCEDURE george
@code int
begin
...........





给我发一个excel,其中包含我必须执行的代码(对于@code)

例如excel有1列(代码) )和3行( 1111,2222,3333



问题是当我要执行它时我必须给



the send me an excel which has the codes ( for @code) that i must to execute
e.g excel has 1 column (code) and 3 rows (1111, 2222,3333)

the problem is when i am going to execute it i have to give

EXEC george @code = '1111'
EXEC george @code = '2222'
EXEC george @code = '3333'





为了执行(串联)。但是当excel文件有100行时这是一个问题



你能说出一种方法(写不同的程序或别的东西)所以我必须给只有ONCE执行程序,这将执行excel中的所有代码((串联)一个接一个。

提前感谢



in order to execute ( in series). but when the excel file have 100 rows this is a problem

could you tell a way ( to write different maybe the procedure or something else) so that i have to give only ONCE execution for the procedure and this executes all the codes from the excel (( in series) one after the other.
thanks in advance

推荐答案


这篇关于使用多个值为单个参数执行存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 04:58