Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Insert blanks into result fields
garvin
Hi all,
as I wrote in a thread before I want to use birt to create a csv-file. Each field in the file has a fixed length. For example "name" has a lenght of 20. If a name only consists of 12 letters, 8 leading blanks should be added to the name. These blanks can be added with the following sql:
SELECT RIGHT(' '+CONVERT(NVARCHAR,ISNULL(Name, ' ')),20)
FROM Address
Unfortunately birt adds quotation marks (" ") to the resulting csv file, assumedly because of whitescpace created by the sql statement. So, it seems like this solution of adding whitespace doesn't work with birt. Is there another solution? Is it possible to use a simple select statement:
SELECT Name FROM Address
and let birt add the whitespace so that no " " are added to the result?
regards,
Garvin
Find more posts tagged with
Comments
mwilliams
Hi Garvin,
You're using the CSV output? Or you're just wanting the run report to look like a CSV file?
You should be able to create computed columns in your dataSet that check the length of a field and could add spaces depending on the length and use those fields.