SQL Statement

The SQL Statement Task Type is used for executing SQL directly on a connection. Currently the SQL Statement task can only be used with SQL Server connections, supporting T-SQL syntax validation.

Providing the Statement

Provide a script here

SQL Statements can be provided directly in-task using the statement editor provided, or the path to a .sql file can be used in place of the statement by choosing File Connection as the Statement Source.

Provide the path to the file in Script Folder Path.

Provide a path here

You can enable a setting for this task to run scripts in parallel. This will allow the Loome Integrate agent to execute multiple scripts in parallel, rather than in sequence. Learn more here.

Utilizing Parameters

SQL Statements support parameters which can be used to provide variables that can be modified at a job sequence level. This means you could have the same SQL Statement task with different results and effects depending on what parameter is provided.

Parameters can be referenced in script using the T-SQL local variable syntax of @PARAMETER_NAME.

Parameter values need to be set when the task is added to a job’s sequence. Learn more about parameters in the jobs documentation.

Example Variable Usage

Param Name Param Value Script Formatted Script
Name Alex SELECT * FROM People WHERE [FirstName] = @NAME SELECT * FROM People WHERE [FirstName] = 'Alex'

To learn how to use a File Connection as your Script Source to execute a script in your Git Repository, please read more here.