Skip to content

Instantly share code, notes, and snippets.

View arviman's full-sized avatar

Arvind Balasubramaniam arviman

View GitHub Profile
DECLARE @proc varchar(255), @dynamicSql varchar(255), @ParamDefinition varchar(255), @Actor1 nvarchar(255),@Actor2 nvarchar(255)
SET @proc = 'OnScreenChemistry'
--*cursor declare/fetch stuff*
--set @Actor1, @Actor2 values here from your cursor
--create your query with placeholders for the parameters to your stored proc
SET @dynamicSql = 'exec ' + @proc + '@Actor1Param,@Actor2Param,@ResultParam output'
--create definitions for your parameter placeholders
Set @ParamDefinition = '@Actor1Param nvarchar(255) ,@Actor2Param nvarchar(255), @ResultParam float(53) output'