This Stored Procedure allows users to pass in multiple values as a parameter to it. The user can pass in as many values as he or she wants. The only restriction is the length of the parameter declared. Also, the values need to be separated by a comma. The script was created for SQL Server 2000 but also works in SQL 7.
Example Usage:
DECLARE @ParamStr Varchar(500)SET @ParamStr = ‘Mango, Grapes, Banana, Peach’
exec sp_MultiValueParam @ParamStr
Author: Sumit Dhingra
Download Script:
MultiValueParam.sql
Disclaimer: We hope that the information on these script pages is
valuable to you. Your use of the information contained in these pages,
however, is at your sole risk. All information on these pages is provided
“as -is”, without any warranty, whether express or implied, of its accuracy,
completeness, or fitness for a particular purpose…
Disclaimer Continued
Back to Database Journal Home