I have a string field with values as long as 50 characters and as small as 2 characters or some times, a blank value.
But i need to display this field so that it displays 10 characters only.
But if it is less than 10 characters, then the first space characters should be appended to the actual field value.
Example : Field = 'ABCDEFGHIJKL'.
Then it should be substr(Field,1,10) which gives me 'ABCDEFGHIJ'.
But if Field = 'ABCD'
Then it should display ' ABCD' ( 6 spaces followed by the field value).
If the field has a null value, the it should still maintain those 10 spaces.