The execution of the Stored Procedure below results in the following output
The above output isn't create in a view or a table that can be queried later.
Can someone show me how to modify the procedure such that the output results in the creation of table called, say dbo.mytesttable
The Stored Procedure is as follows:
CREATE PROC outbound.usp_Terminals(@AsOfDate date)
AS
SELECT
airport_code,
airport_name,
airport_city,
airport_state
FROM
dbo.fnGetAirports(@AsOfDate)
GO
A friend suggested the following code, but it didn't work:
DECLARE @date date
SET @date = ...
INSERT INTO #prebuilt_table
EXEC dbo.outbound.usp_Terminals @date
1条答案
按热度按时间kqlmhetl1#
There are a number of solutions, the simplest of the solutions is as follows: