开发者

Stored Procedure returning Multiple resultset

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜