I have a storedprocedure which has multiple columns. I want to insert only certain columns of this stored procedure into a temp table.
CREATE TABLE #Temp
(
Product VARCHAR(MAX),
)
INSERT INTO #Temp (Product)
EXEC mpaGetProducts
Currently I get the error : "Column name or number of supplied values does not match table definition"
I do not want to insert into one table first and then select only required columns because there is a large amount of data and this would cause a hit on the performance.
I saw this post & a few others online but it wasn't very helpful : Insert results of a stored procedure into a temporary table