Hi,
Am using RTRIM and LTRIM functions in the DRS stage. I have nearly 80 char type columns. i feel very difficult to give this function to all the columns. So, can any one tell me the best way to implement this function easily in a DRS stage.
it will reduce my effort
How easily we can give funciton in DRS stage of 80 columns
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
Do it in a transformer. Put in your input columns and your output columns, automap them together in the transformer. Highlight every derivation column in the right hand side of the transformer window and choose Derivation Substitution from the right mouse menu, replace the whole expression with RTRIM(LTRIM($1)) to add the function to every derivation.
Also consider putting RTRIM(LTRIM into a routine, that way you can add more handling to it later such as null value, date checking, funny character checking etc.
The search and replace functions in transformers are worth getting to know.
Also consider putting RTRIM(LTRIM into a routine, that way you can add more handling to it later such as null value, date checking, funny character checking etc.
The search and replace functions in transformers are worth getting to know.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn