Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

moving values from a stored proc into variables

Status
Not open for further replies.
Dec 31, 2004
71
GB
Hi All,
I have a stored procedure that returns 3 columns of data, is there a way I can move each of these columns into variables?

 
How many rows?

If one, a table variable. Or change the stored proc to return output variables instead of a table.

If more, either a table variable with an IDENTITY column or a cursor.

Maybe someone else here has a better suggestion...


HTH

[pipe]
Daniel Vlas
Systems Consultant

 
Thanks very much, I need to use an input variable in the stored proc.

I tried adding a new variable @var type (100) OUTPUT

Put when run it gives me the message that @var is required.

Can I use both input and output values in the same proc?

 
Think I have sussed it, I was not calling the variable from SP 2 ie.

exec sp_custom @input, @output OUTPUT

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top