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
 Transact-SQL (2000)
 Passing Table Variables between sprocs

Author  Topic 

jbkayne
Posting Yak Master

100 Posts

Posted - 2002-01-23 : 19:18:15
Can you pass table variables between/to sprocs?

From the "Create Procedure" definition in Books Online it would seem like this would be reasonable.

Syntax
CREATE PROC [ EDURE ] procedure_name [ ; number ]
[ { @parameter data_type }
[ VARYING ] [ = default ] [ OUTPUT ]
] [ ,...n ]

Thanks!

ttcrissy
Starting Member

8 Posts

Posted - 2002-02-12 : 08:28:56
Unfortunately, the answer is NO:(
Although BOL seem to make it possible it isn't. I looked for it all over the Internet and found only negative answers.
As an alternative try using temporary tables (those with # ;)) or inline/scalar functions.

Best luck!!!

Go to Top of Page

JamesH
Posting Yak Master

149 Posts

Posted - 2002-02-13 : 15:16:35
I would suggest that you read BOL more, there is an example of using the output statement and passing parameters between sprocs.


JamesH.

Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-02-13 : 15:26:19
Other parameter types can be passed, but table variables cannot be accepted by a stored procedure. I tried it; it causes a syntax error in the CREATE PROCEDURE command.

Edited by - robvolk on 02/13/2002 15:26:48
Go to Top of Page
   

- Advertisement -