Text manipulation
Posted: Tue Aug 07, 2007 5:32 pm
Hi all,
I have a requirement where in I need to convert some values in a tables below.
From------------------------->To
===================================
111,22,3245,44 ------------> ##111,###22,#3245,###44
32,434-----------------------> ###32,##434
1232,3432,54,54334-------> #1232,#3432,###54,54334
.
.
.
===================================
Rule
- To pad the input data to a make it a total of 5 characters(left Pad the remaining with '#')
- The number of values in a coulmn is not fixed.
- The number of rows is not known.
I can convert the first value by using FMT and Field
FMT(Field(In.Value,',',1),"5'#'R")
How can I change it for all the values in the input?
Any inputs appreciated?
I have a requirement where in I need to convert some values in a tables below.
From------------------------->To
===================================
111,22,3245,44 ------------> ##111,###22,#3245,###44
32,434-----------------------> ###32,##434
1232,3432,54,54334-------> #1232,#3432,###54,54334
.
.
.
===================================
Rule
- To pad the input data to a make it a total of 5 characters(left Pad the remaining with '#')
- The number of values in a coulmn is not fixed.
- The number of rows is not known.
I can convert the first value by using FMT and Field
FMT(Field(In.Value,',',1),"5'#'R")
How can I change it for all the values in the input?
Any inputs appreciated?