Hi there,
Is there an equivalent to vb or oracle TRIM function in DataStage?
I have a seqential file stage connected to one transform, then 2 output links from the transform stage.
In the transform stage I'd like to trim the leading and trailing spaces in the contents of a field before sending the field out through the output links.
I don't have the DS documentation on me so can't look up how to achieve this. I'm assuming the function -if there is one- would be placed in the derivation section for the column in question inside of the tranform stage?
Thanks!
trim in DS?
Moderators: chulett, rschirm, roy
You can use the function "Trim" in the rigth side of trasformer.
Mario
quote:Originally posted by sweetleaf
[br]Hi there,
Is there an equivalent to vb or oracle TRIM function in DataStage?
I have a seqential file stage connected to one transform, then 2 output links from the transform stage.
In the transform stage I'd like to trim the leading and trailing spaces in the contents of a field before sending the field out through the output links.
I don't have the DS documentation on me so can't look up how to achieve this. I'm assuming the function -if there is one- would be placed in the derivation section for the column in question inside of the tranform stage?
Thanks!
Mario
quote:Originally posted by sweetleaf
[br]Hi there,
Is there an equivalent to vb or oracle TRIM function in DataStage?
I have a seqential file stage connected to one transform, then 2 output links from the transform stage.
In the transform stage I'd like to trim the leading and trailing spaces in the contents of a field before sending the field out through the output links.
I don't have the DS documentation on me so can't look up how to achieve this. I'm assuming the function -if there is one- would be placed in the derivation section for the column in question inside of the tranform stage?
Thanks!
sweetleaf
There is help within the Designer.
trimb() - removes trailing spaces
trimf() - removes leading spaces
trim() - removes trailing, leading and redundant spaces
trim(string, char, option) - where char is any single character
option:
A Remove all occurrences of character
B Remove both leading and trailing occurrences of
character
D Remove leading, trailing, and redundant white
space characters
E Remove trailing white space characters
F Remove leading white space characters
L Remove all leading occurrences of character
R Remove leading, trailing, and redundant
occurrences of character
T Remove all trailing occurrences of character
Thanks Kim.
Kim Duke
DwNav - ETL Navigator
www.Duke-Consulting.com
There is help within the Designer.
trimb() - removes trailing spaces
trimf() - removes leading spaces
trim() - removes trailing, leading and redundant spaces
trim(string, char, option) - where char is any single character
option:
A Remove all occurrences of character
B Remove both leading and trailing occurrences of
character
D Remove leading, trailing, and redundant white
space characters
E Remove trailing white space characters
F Remove leading white space characters
L Remove all leading occurrences of character
R Remove leading, trailing, and redundant
occurrences of character
T Remove all trailing occurrences of character
Thanks Kim.
Kim Duke
DwNav - ETL Navigator
www.Duke-Consulting.com