Page 1 of 1
Need to trim Special Character
Posted: Wed Nov 25, 2009 1:40 am
by gssr
I need to Trim the special Character "
" Tab Char.
I used Trim function ,but throughs me error!!!
Any Suggestions!
Thanks in Advance!
Posted: Wed Nov 25, 2009 1:42 am
by ray.wurlod
Specify the tab character in the Trim() function as the character to be trimmed.
The tab character can be represented as Char(9).
Performance tip: Evaluate Char(9) when initializing a stage variable (perhaps called svTab). Then don't provide a derivation for this stage variable in the main part of the Transformer stage.
Posted: Wed Nov 25, 2009 3:07 am
by gssr
ray.wurlod wrote:Specify the tab character in the Trim() function as the character to be trimmed.
The tab character can be represented as Char(9).
Performance tip: Evaluate Char(9) when initializing a stage vari ...
I could not able to mention the Tab Char in the Trim function. Do i have to mention Char(9) for it?
Thanks,
Posted: Wed Nov 25, 2009 6:30 am
by naveen.p
Could you try these functions with the strip characters
TrimB Remove all trailing spaces and tabs
TrimF Remove all leading spaces and tabs
Posted: Wed Nov 25, 2009 6:49 am
by gssr
It removes only the spaces, the source file has the "Tab Character" in it
Posted: Wed Nov 25, 2009 8:10 am
by chulett
gssr wrote:Do i have to mention Char(9) for it?
Yes. And that is the
resolution, not a 'workaround'.
Posted: Wed Nov 25, 2009 12:17 pm
by ray.wurlod
Were you to follow my advice you would mention, in the Trim() function, the stage variable whose value has been initialized to Char(9).
Posted: Thu Nov 26, 2009 12:28 am
by gssr
Thank you all. The problem is resolved