Trailing Spaces or Zeros

trafford69

New Member
Hi All,

How do i add a trailing/behind space/zeros to a field in progress?

Here is a sample i did to add zeros in start/beginning.
STRING(FILL(" ",2 - LENGTH(TRIM(SUBSTR(ID00_RESERVED,12,2)))))


Thanks.:biggrin:
 
As I understood you need to add some spaces in the end of string. Am I right?

What about
ID00_RESERVED = ID00_RESERVED + FILL(" ",x), where x is a number of spaces.
 
I need to pad with a space if the string is 1 digit (eg. 1^) and pad with spaces if the string is blank with just spaces (eg. ^^). Thanks.
 
I need to pad with a space if the string is 1 digit (eg. 1^) and pad with spaces if the string is blank with just spaces (eg. ^^).
SUBSTR(string + FILL(" ",x),1,x), where x is the length of final string, in your example x = 2.
 
Back
Top