July 27, 2001
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.
DECLARE @ParamStr Varchar(500) SET @ParamStr = 'Mango, Grapes, Banana, Peach' exec sp_MultiValueParam @ParamStr
Author: Sumit Dhingra
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...
Back to Database Journal Home