Home Forums SQL Server 2005 T-SQL (SS2K5) pass table name as a parameter in stored procedure RE: pass table name as a parameter in stored procedure

  • you may try this:

    create a table type and define the table structure;

    declare the SP that has a parameter of tble type;

    declare a table type variable and reference the table type;

    insert the data from your table to the variable;

    Now you can pass the variable to the procedure and execute it.

    Here is the link by Pinaldave

    http://blog.sqlauthority.com/2008/08/31/sql-server-table-valued-parameters-in-sql-server-2008/

    Good luck

    Jessie