开发者

Modify Stored procedure parameter value

开发者 https://www.devze.com 2023-02-08 19:05 出处:网络
My Stored procedure takes one parameter @IDs and it has values in it like \'1,2,3\'. I want to get rid of these single quotes. How can I do it? Like I want just 1,2,3 and开发者_如何学Go NOT \'1,2,3\'.

My Stored procedure takes one parameter @IDs and it has values in it like '1,2,3'. I want to get rid of these single quotes. How can I do it? Like I want just 1,2,3 and开发者_如何学Go NOT '1,2,3'. How do I modify this parameter value inside my SP?


you can do this:

@IDs = REPLACE(@IDs, '''', '');

If your parameter is VARCHAR, NVARCHAR or something like string :)


You could use a table varaible instead, read in BOoks online for how to do that.

0

精彩评论

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

关注公众号