Dear Experts,
I want to load data from a store procedure to a temporary table. As long as I know, we cannot using SELECT...INTO (dynamically), like:
SELECT INTO #TBL EXEC USP_STOREPROC
We need to create the table first and specify the columns, as well as datatype. Only after the table created, we can load the data from store procedure to the table:
INSERT INTO #TBL EXEC USP_STOREPROC
The problem is I do not know the structure of the temporary table before run the store procedure. Any idea how to dynamically create the temporary table?
Regards,
kokyan