Don't know if you are still monitoring this, or if you care but you can also do this (useful if you have a bunch of optional parameters and good for debugging / readability)EXEC ,procedureName]> @param1 = x , @param2 = y , @param5 = z
Where @param is the name of the paramater declared by the sp.Example:CREATE PROCEDURE displayText ( @text NVARCHAR(MAX) , @startPos INT = 0 , @endPos INT = 100 )AS BEGIN PRINT SUBSTRING(@text, @startPos, @endPos)ENDGO-- All paramsEXEC displayText @text = 'foo000000000000000000000' , @startPos = 2 , @endPos = 10-- Only esential paramsEXEC displayText @text = 'foo000000000000000000000'-- 1 of the optional paramsEXEC displayText @text = 'foo000000000000000000000' , @endPos = 10
-------------Charlie