Table of Contents

Search

  1. Preface
  2. Mappings
  3. Mapplets
  4. Mapping Parameters
  5. Where to Assign Parameters
  6. Mapping Outputs
  7. Generate a Mapping from an SQL Query
  8. Dynamic Mappings
  9. How to Develop and Run a Dynamic Mapping
  10. Dynamic Mapping Use Cases
  11. Mapping Administration
  12. Import From PowerCenter
  13. Performance Tuning
  14. Pushdown Optimization
  15. Partitioned Mappings
  16. Developer Tool Naming Conventions

Developer Mapping Guide

Developer Mapping Guide

Tips for Using Parameters in SQL Statements

Tips for Using Parameters in SQL Statements

You can use tips to use parameters in SQL statements more effectively.
  • For a string parameter, use single quotes when you define the parameter in the query.
  • Do not use single quotes for a parameter if the parameter is not a string. You might get unexpected results.
  • For a string parameter, if the SQL query and the default value of the parameter do not have single quotes, you can add an upstream Filter transformation in the mapping. In the Filter transformation, edit the filter condition to include single quotes around the parameter.
  • A parameter name cannot contain a period (.) . An SQL query is not valid if it has a parameter that contains a period. For example, the following SQL statement has a parameter name that contains a period:
    SELECT
    $tname.ID
    ,"MY_SOURCE"."NAME" FROM "MY_SOURCE" where FIELDX=1
    When you validate the query, the Data Integration Service returns an error that it cannot find the tname.ID parameter.

0 COMMENTS

We’d like to hear from you!