开发者

Stored Procedure returning Multiple resultset

开发者 https://www.devze.com 2022-12-16 16:03 出处:网络
One Stored procedure returning multiple result sets and I need only the last result set, How do I achieve this without changing original procedure. am using the last reulst set in further processing i

One Stored procedure returning multiple result sets and I need only the last result set, How do I achieve this without changing original procedure. am using the last reulst set in further processing in other Stored pr开发者_StackOverflow社区ocedure.


if you are "filling" a dataset in c#, very simple, just use:

datasetobj.Tables[datasetobj.Tables.Count-1].Table

to get the DataTable

if doing this within sql procedures (i.e. one procedure calling another that returns multiple), best solution would be to use output variables. concept:

procedure1 returns multiple resultsets

when calling:

declare @table1 table (), @table2 table () exec procedure1 out @table1, out @table2

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号