Export stored procedure results into a table

前端 未结 2 1688
忘掉有多难
忘掉有多难 2021-01-27 06:24

I have the following stored procedure that generates SQL statements based on certain conditions.

I\'d like for the SQL statements to also return the actual results into a

2条回答
  •  鱼传尺愫
    2021-01-27 07:14

    ) AS [ValidationCounts];
    -- insertion here-
    Insert into temp_table (col1, col2, col3, ...)
    SELECT
        @ReportYearCmd AS ReportYearCmd,
        @CosCountCmd AS CosCountCmd,
        @FranchiseCountCmd AS FranchiseCountCmd,
        @ProductCountCmd AS ProductCountCmd;
    

提交回复
热议问题