Page 1 of 1

How easily we can give funciton in DRS stage of 80 columns

Posted: Mon Nov 08, 2004 7:34 pm
by rajiivnb
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

Posted: Mon Nov 08, 2004 8:05 pm
by rasi
There is not shortcut for doing this. The most you can do is use the user defined sql and do you text modification using any text editor of your choice and paste it back once you finished.

You can add this feature in the wishlist for ascential to make us lazy

Thanks
Siva

Posted: Mon Nov 08, 2004 8:11 pm
by vmcburney
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.