Can someone give me a working example of using OPENROWSET
on SQL Server with dynamic SQL (sp_executesql
) executing a stored procedure with two parameters as variables, preferably date and integer? I want to use that output and INSERT INTO
a temp table
INSERT INTO #t
SELECT * FROM OPENROWSET
(
SQL Server
SP with two parameters date and integer)
SELECT * FROM #t
INSERT ... EXEC LinkedServer.Db.Schema.Proc ...