Modify Stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 30
- Joined: Mon May 29, 2006 11:19 pm
Modify Stage
Hello All
Im trying to Trim a Varchar type field in Modify Stage
with the following specification
M_No = string_trim[""](M_No)
here my M_No is Varchar type field
but it is throwing the error msg at Run time
main_program: Error parsing modify adapter: Error in binding: Parsing parameters """" for conversion "string=string_trim[NULL,end,begin](string)": Only one character, or NULL expected, got:
Expected destination field selector, got: ")"; input:
M_No = string_trim[""](M_No)
;
I have tried with the following options
M_No= string_trim[" ", begin,end](M_No)
M_No= string_trim[" ", begin](M_No)
M_No= string_trim[" ", end](M_No)
M_No varchar(255)=string_trim(M_No)
But no one is working
Can Any one help me
Im trying to Trim a Varchar type field in Modify Stage
with the following specification
M_No = string_trim[""](M_No)
here my M_No is Varchar type field
but it is throwing the error msg at Run time
main_program: Error parsing modify adapter: Error in binding: Parsing parameters """" for conversion "string=string_trim[NULL,end,begin](string)": Only one character, or NULL expected, got:
Expected destination field selector, got: ")"; input:
M_No = string_trim[""](M_No)
;
I have tried with the following options
M_No= string_trim[" ", begin,end](M_No)
M_No= string_trim[" ", begin](M_No)
M_No= string_trim[" ", end](M_No)
M_No varchar(255)=string_trim(M_No)
But no one is working
Can Any one help me
-
- Participant
- Posts: 30
- Joined: Mon May 29, 2006 11:19 pm
Re: Modify Stage
Still waiting for reply
Can any one come uo with Answer
Thanks
Can any one come uo with Answer
Thanks
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The following functions are available for the Modify stage.
- trimc(string)
trimc(string, ch)
trimc(string, ch, option)
trim_trailing(string)
trim_leading(string)
strip_whitespace(string)
compact_whitespace(string)
trim_leading_trailing(string)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 30
- Joined: Mon May 29, 2006 11:19 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
This works for me.
where Col1 is the column to be trimmed.
But i could not trim both leading and trailing spaces.
Has anyone managed to trim both leading and trailing spaces using modify stage?
Code: Select all
Col1=string_trim[" ",end](Col1)
But i could not trim both leading and trailing spaces.
Has anyone managed to trim both leading and trailing spaces using modify stage?
I know that it is available in Transformer but could not do the same in the modify stage. I will try what Ray has suggested in the previous post.ukyrvd wrote:search on DS Help resulted in the following function
-----
TrimLeadingTrailing
Returns a string with leading and trailing whitespace removed
string (string)
result (string)
-----
I remember using this in XFM .. you can try and see if its available in Modify stage as well??