Using the result of an Stored procedure in a Select statement

后端 未结 5 552
暗喜
暗喜 2021-01-20 15:27

I have a stored procedure which returns a Dataset(Table). How can I use the result of this stored procedure in a SELECT statement?

I need s

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-20 15:57

    Use Insert Into ... Exec and store the result into a Temp Table... Then you can join the Temp table in your select statement.

    Alternatively as suggested before try converting the SP into a Table valued function.

    This link provides much more options for you... http://www.sommarskog.se/share_data.html

提交回复
热议问题