How do I execute a query in a script task?

  • How do I execute a query in a script task? I want to check the rowcount based on a condition and if it is greater than 0 then I want the SSIS package execution to proceed further.

    Please let me know.

    Thanks,

    Manisha

  • You would be better doing an OLEDB_COMMAND_TASK with a read/write variable having a scope sufficient for the next step, and using a conditional path based on the variable.

  • I see that you can execute a stored procedure using an ole db command task, but not a sql statement like this:

    select count(*) from foo where x = y and z = g

    Am I correct on that?  Can u please give some input.

     

    Thanks,

    Manisha

  • Never mind I figured this.  Execute SQL task is what I should use.

    Thanks for your input.

    Manisha

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

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