i have column having multiple value like A0045 ,A00065 . i want to convert it 9945, 9965. Need to remove all 0 and character value and add 99 before that value.. Please help..>
This can be done in many ways. Here is one way (may not be the best). As I don't have a database, I created a temp table.
def temp-table tt
field val as char.
create tt.
tt.val = "A0045".
create tt.
tt.val = "A00065".
for each tt:
run filter_zero(input-output val).
val = replace(val,"A","99").
DISP val.
end.
procedure filter_zero:
define input-output parameter val as character.
// remvoe all zeroes
repeat while val matches("*0*"):
val = replace(val,"0","").
end.
end procedure.