Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Serializing tables and reusing stored procs

Author  Topic 

heze
Posting Yak Master

192 Posts

Posted - 2007-03-08 : 19:10:53
hi,

I need some feedback, I just realized that many of my stored procedures can be reused by "serializing" table in xml format and setting an output variable of the specified sproc.
Then whenever I want to use a specific output of that sproc I consume the output variable with the OPENXML function and create a table and just start using it.
To make it general I create a procedure that dynamically creates a function which varies according to the required "WITH" clause of the OPENXML, which of course is defined at calling time.
-------------



I know one can do the folloiwng:

insert into myTable
exec myproc
---
But this does not work when the procedure returns more than 1 dataset

Is this a sensible way to extract the output and thus reuse stored procedures?

Thank you
   

- Advertisement -