Adding User-Written SQL Code


You want to add user-written code to an SQL query that is used in a SAS Data Integration Studio job. This user-written code can consist of SQL code that is added to a WHERE, HAVING, or JOIN clause. It can also overwrite the entire DATA step for the SQL Join transformation.


You can add SQL code to an SQL WHERE, HAVING, or JOIN clause in the properties window for the clause. To set the user-written property for a clause, click the clause in the SQL Clauses pane in the Designer window. Then, select Yes in the User Written field and enter the code in the SQL field on the clause's tab. The following display shows sample user-written code added to a WHERE clause.
Sample User-Written SQL Code
Sample User-Written SQL Code
Note that the following line of SQL code was added to the SQL field on the Where tab:
 and US.Population < 5000000
This code is also highlighted on the Code tab.

Additional Information

For information about how to overwrite the entire DATA step for the SQL Join transformation, see About User-Written Code.