Modify Stored procedure parameter value
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.
精彩评论