sql - Create table from nth result set of stored procedure -
i have stored procedure returns 4 result sets. results sets have lots of columns.
what's best way create table out of each result set? info types , schema in tables should same ones result sets.
i know can create table selection:
create table table_name select * users
so there way select result set stored procedure execution??
while covered in chat, should still have reply others might wondering same thing.
the way access specific result set out of multiple results sets, , within context of t-sql, via sqlclr. using c#, vb.net, or .net language, utilize sqldatareader
can access result sets separately.
the sqlclr proc exec existing t-sql proc , can either spit out single result set (assuming input param specify 1 homecoming result set) or separate connection , straight phone call insert statements 4 @ same time (although @ point console app or windows form or whatever).
sql sql-server tsql
No comments:
Post a Comment