Create an SQL query in the SQL Editor to retrieve rows from a database or to update the database.
To create a query, type the query statement in the SQL Editor in the SQL view. You can enter up to 32767 characters in an SQL query statement. The SQL Editor provides a list of the transformation ports that you can reference in the query. You can double-click a port name to add it as a query parameter.
When you create a query, the SQL Editor validates the port names in the query. It also verifies that the ports you use for string substitution are string datatypes. The SQL Editor does not validate the syntax of the SQL query.
You can use constants in the SQL query. Enclose each string in a single quote (').
The following figure shows a sample SQL query:
You can create a static SQL query. The query statement does not change, but you can include parameters to change values. The Data Integration Service runs the query for each input row.