Hi, As Integer ranges from -2147483648 to +2147483647, So it needs 10 characters for digits and1 for sign. By default when you convert an integer to characters it is right justfied inside character space.
Here you have 986 as integer so when it is converted into characters it is right justified in 4 characters space like +986.
You can try cast function it will trim all leading spaces. SELECT '(' || CAST((a+1) AS CHAR(3)) || ')' FROM dummy;
Hi,
As Integer ranges from -2147483648 to +2147483647, So it needs 10 characters for digits and1 for sign. By default when you convert an integer to characters it is right justfied inside character space.
Here you have 986 as integer so when it is converted into characters it is right justified in 4 characters space like +986.
You can try cast function it will trim all leading spaces. SELECT '(' || CAST((a+1) AS CHAR(3)) || ')' FROM dummy;