How can I get data from a stored procedure into a temp table?

前端 未结 4 2044
孤独总比滥情好
孤独总比滥情好 2020-12-15 22:24

Am working on sybase ASE 15. Looking for something like this

Select * into #tmp exec my_stp;

my_stp returns 10 data rows with two columns i

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-15 22:37

    If my_stp is populating data by computing values from different tables, you can create an equivalent view which does exactly the same as my_stp.

    CREATE VIEW My_view
     AS
    /*
      My_stp body
    */
    
    
    Then select data from view 
    SELECT *  INTO #x FROM my_view
    

提交回复
热议问题