Joined: 21 Jan 2011
Online Status: Offline
Posts: 107
Topic: String with blanks Posted: 24 Feb 2021 at 5:15pm
Hi
Im writing a report in SQL where I need to bring back a customer name in 20 characters.
However customer names vary and for those names with less than 20 characters I need to bring back spaces to complete the 20 characters.
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 25 Feb 2021 at 3:55am
you mean you always want 20 characters with spaces to pad out the remainder?
in a formula field, concatenate the field and a string with 20 spaces and then grab the left 20 of that...
left([table.namefield]+' ',20)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum