开发者

Execute stored procedure named as a string

How can I execute a stored procedure named as a string

开发者_如何学编程

I tried this:

EXEC CAST(@GetDD AS StoredProcedure);


Create a dynamic SQL string, and execute that:

declare @sql varchar(512);
set @sql = 'exec ' + @GetDD;
EXEC (@sql);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜