create sp with a data type TABLE as the parameter

  • I have a package load data into the @table.

    I want to call the another package with the data in the @table. What is the correct syntax?

     

    ex.

    ALTER PROC SP1

    AS ....

    EXEC SP2 @TABLE

    ......

     

    ALTER PROC SP2

    @TABLE TABLE?????

    AS.......

  • SQL Server does not accept table variable as parameter

  • I know it is a new data type for SQL Server 2000 (which I am using). I know you can pass it in a function. I have seen code that refers to the function, but have not seen any code pass the data type  as a parameter between stored procedures.

    So SQL Server 2000 does not let you pass it as a parameter from one stored procedure to another? Is this a correct statement?

  • You can select the results of a proc into another proc (see BOL: exec). You can also return a valid parameter from a proc as an output parameter but table variable is not a valid proc parameter in 2000(as stated).

  • Maybe you confuse this with the function table ?

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply