Hi All,
I am using datastage 8.1 and have issues with null handling.
In a Transformer, have an input filed as Varchar. The output from the Transformer is varchar.
The Output is then used to update an Oracle table.
The following are the rules with examples:
Input value Output value
Smith Smith
(null) (null)
Space (null)
Smith with trail spaces Smith (without spaces)
The questions:
1. Is there a function in datastage that will give me Null as a result of removing all the blanks from a field?
2. Using TRIM on the 3rd example, what is the result? Empty String or Null string ?
3. Is there a function to turn Empty to Null?
4. What functions can I use to get the above, if I am using stage variables ( that can not be nulls)?
Thanks in advance.
Regards, Walter
Datastage Transformer Null handling
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 1
- Joined: Tue Sep 14, 2010 9:52 pm
Code: Select all
If IsNull(InputValue) or Trim(InputValue) = '' Then SetNull() Else Trim(InputValue)
Kris
Where's the "Any" key?-Homer Simpson
Where's the "Any" key?-Homer Simpson