Wednesday, August 10, 2016

Infront of variables which symbol is best to use ':' or '#' in ODI


Based on the requirement, consider following steps and select the appropriate symbol

Serial Number
Using ‘:’ infront of variables
Using ‘#’ infront of variables
1
When we are using variable as SQL bind variable it is better to use colon rather than a hash

2
Syntax is subject to restrictions as it only applies to SQL DML statements, not for OS commands or ODI API calls
No restrictions as it applies on all
3
Performance loss
Optimal Performance at run-time
4
The name of the Variable is NOT substituted when the RDBMS engine determines the execution plan. The variable is substituted when the RDBMS executes the request. (this mechanism is called Binding Mechanism)
The name of the Variable is substituted when the RDBMS engine determines the execution plan
5
The variable reference need not to be enclosed in single quote characters.
For example : NAME = :GLOBAL.V_NAME
The variable reference needs to be enclosed in single quote characters.
For example NAME = '#GLOBAL.V_NAME'.

No comments:

Post a Comment