How to convert A00073 value to 9973 in progress 4gl

前端 未结 5 1858
日久生厌
日久生厌 2021-01-29 04:37

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..

5条回答
  •  孤城傲影
    2021-01-29 05:24

      DEFINE VARIABLE word AS CHARACTER   NO-UNDO.
        SET word.
        word =  REPLACE(word,SUBSTRING(word,1,R-INDEX(word,"0")),"99").   
        /* If you want to remove all words before last zero 
         (including last zero also)  * /
    
        MESSAGE word
            VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
    

提交回复
热议问题