Something about DataStage, DataStage Administration, Job Designing,Developing, DataStage troubleshooting, DataStage Installation & Configuration, ETL, DataWareHousing, DB2, Teradata, Oracle and Scripting.
Wednesday, February 04, 2015
Modify Stage - TRIM function
For trimming spaces or a char from a string can be done in modify stage. Below, I have shared the function syntax and some example, go Play ;-)
string_trim[character,direction,justify](string)
or
string_trim[character,direction](string)
or
string_trim[character](string)
or
string_trim(string)
EMP_Name= string_trim[" ",end](EMP_Name) ---- Trim ' ' from String end
EMP_Name= string_trim[" ",begin](EMP_Name) ---- Trim ' ' from String start
EMP_Name= string_trim["a",end](EMP_Name) ---- Trim char 'a' from String end
EMP_Name= string_trim["b",begin](EMP_Name) ---- Trim char 'b' from String start
Like the Facebook Page & join Group
https://www.facebook.com/DataStage4you
https://www.facebook.com/groups/DataStage4you
https://twitter.com/datastage4you
https://groups.google.com/d/forum/datastage4you
For WHATSAPP group , drop a msg to 91-88-00-906098
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment