March 10, 2009 at 4:53 am
Hi guy,
I have this situation:
declare @TEMP_DB table(column1, column2 column3 )
insert into @TEMP_DB exec myStoredProcedure 'value1','value2'
the question is easy:
myStoredProcedure return one o more columns, according as the values of the input.
There isn't to know first how many columns.
I cannot use in different ways the storedprocedure, only this.
I should like creating the TEMP_DB in dinamyc mode.
Therefore I can use the result for other scope.
However I don't know if is possibile:
1) Create the temp table with n columns, or without columns.
2) or Use some system stored for the result of my storedprocedure.
You can help me?
thank!!!!!
March 10, 2009 at 6:27 am
why not use a function, instead of a stored procedure, and have the function return a @Table?
then you'd have what you are after...
Lowell
March 10, 2009 at 7:22 am
I cannot use Fuction
beacuse in my storedprocedure I use "executesql" 🙁
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply