I have a stored procedure that takes an input parameter @CategoryKeys varchar, and parses its contents into a temp table, #CategoryKeys.
Stored proc that uses temp table
CREATE OR ALTER Procedure Engine.TestProcTempTable
AS
BEGIN
--DROP TABLE IF EXISTS #TestProcTempTable ;
SELECT * from #TestProcTempTable;
END
Create put data in to temp table which will be used by SP
DROP TABLE IF EXISTS #TestProcTempTable ;
select * into #TestProcTempTable from ;
execute Engine.TestProcTempTable