Execute Stored Procedure from Excel

  • Hi,

    I have 50 Execution statements in excel one column, So how can i run all 50 Execution statements at a time.

    Please share your thoughts.

  • Import Data from in a Table

    Then do something like this

    Declare @v_Query nvarchar(max) = ''

    Select @v_Query = @v_Query + [ColName] +' ;'

    from [Excel_Table]

    EXEC sp_executesql @v_Query

    @v_Query

    this will execute your all queries in one single batch.

    hope it helps

  • Copy paste your column contents in an empty query window.

    Hit F5.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

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

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