Padding a field in a select statement with spaces

Database

Padding a field in a select statement with spaces

Hi, I have a column in a select statement that needs to always result in 19 characters including spaces. It will always be populated with a different number of characters so I need to know how to pad the end with spaces after the last character. Can someone give me the syntax for this.

 Thanks

1 REPLY
N/A

Re: Padding a field in a select statement with spaces

Adding trailing spaces?

CAST('bla' AS CHAR(19))