Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Adding leading blanks to sql result
garvin
Hi all,
please tell me if the following is possible with birt. In dependency of the length of a field I want to add leading blanks to the results. For example, if I have the following sql: select name from addresses and name ist defined as varchar(20).
If a found name has the length 5, 15 blanks should be added. The result should be saved in a csv file. What's the best way to add these leading blanks?
regards,
garvin
Find more posts tagged with
Comments
garvin
I got it. Just plain sql:
RIGHT(' '+CONVERT(VARCHAR,ISNULL(NAME, ' ')),20) AS Name
mwilliams
Hi garvin,
Glad you found a solution. Let us know whenever you have questions!