I use openrowset to execute OperatorsCalc procedure.
How can I send declared parameters:
@operators(OperatorTableType)@number(int)
into procedure that is executed by openrowset?
DECLARE @operators OperatorTableType
insert into @operators values ('Mr James')
insert into @operators values ('Mr Johnny')
DECLARE @number int = 3
SELECT *
INTO #MyTempTableForOperators
FROM
OPENROWSET('SQLNCLI', 'Server=apollo;Trusted_Connection=yes;',
'SET FMTONLY OFF;
SET NOCOUNT ON;
EXEC servername.dbname.dbo.OperatorsCalc @number @operators') -- I want to sent parameters @operators and @number in here
select * from #MyTempTableForOperators