The Execute T-SQL Statement Task is one of the easiest tasks to set up. All you have to do is have an SQL query that you want to run, paste it in the box—and you’re done.
But wait… what if the query is in an .sql file? And what if that file may change? Does that mean that you have to update this task every time the query changes?
Nope. This is a great example of how SQL Server swoops in to save the day. You can select from direct input, file connection, or variable inputs for the SQL query.
We’re going to set up this task differently than the previous plans, because this task ...