Excute sql task vs Excute tsql statement task

Jefferson 426 Reputation points
2024-01-31T09:08:02.53+00:00

When i create my ssis package, i found there are two similar component, Excute sql task vs Excute tsql statement task, what's the difference between them?Which one is more suggested to use?

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,454 questions
0 comments No comments
{count} votes

Accepted answer
  1. ZoeHui-MSFT 33,051 Reputation points
    2024-02-01T05:52:42.1533333+00:00

    Hi @Jefferson,

    The Execute T-SQL Statement task runs Transact-SQL statements. For more information, see Transact-SQL Reference (Database Engine) and Integration Services (SSIS) Queries.

    This task is similar to the Execute SQL task. However, the Execute T-SQL Statement task supports only the Transact-SQL version of the SQL language and you cannot use this task to run statements on servers that use other dialects of the SQL language. If you need to run parameterized queries, save the query results to variables, or use property expressions, you should use the Execute SQL task instead of the Execute T-SQL Statement task. For more information, see Execute SQL Task.

    Reference: Execute T-SQL Statement Task

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

0 additional answers

Sort by: Most helpful