Dynamic execution of stored proc

  • Dear friends,

    I have a table with 100 rows and 5 columns.

    I want to execute a certain proc which takes parameters from each of the 5 columns of the table.

    How do I build the stored proc dynamically at run time and execute it 100 times ie. for each row?

    Many thanks in advance,

    kg


    KG

  • Why do you need to build that sp dynamically? The column names don't change, I suppose...

  • Hi,

    Thanks for your reply. Actually I am trying to incorporate this logic in one DTS package.

    I have an excel file with 100 rows and 10 columns.I have a stored proc to execute against each of these 100 rows , with parameter values from the 10 columns.

    Again this excel file has multiple sheets with variable number of columns. I am trying to accomplish this through DTS, but can't figure out the best method to do.

    Many thanks,

     


    KG

  • Why can't you build one sp and use it for all your cases?

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

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