DavidGreenfield
asked on
SQL Reporting Services 2005 Save as CSV Issues
Hi there
I have a simple table in SQL 2005 Reporting Services, that I am saving out as a CSV file. This is for importing into Sage.
I need the CSV file to firstly not have any headers, which I can't see a way of doing in SQL RS, as it takes the name from the properties of the table cell naem where the value is, but would be interested if anyone has any ideas.
Secondly, I need the CSV file to be comma seperated which it is, but I also need the saved CSV file to have quotes as the text qualifier. Again there seems to be no option on this in RS. So for this I have tried ="""" & field!fieldsname & """" which displays fine when rendered, but when saved as a CSV you get """Fieldname""","""fieldna me2""" etc, so then instead I tried =chr(34) & field!fieldname & chr(34) and again I get in the rendered view "Fieldname1" but when saved to a CSV file I get """fieldname""","""fieldna me2""".
It seems slightly mad that there is not somehow in RS to format the type of CSV file I want to save, can anyone help me?
Any help much appreciated
David
I have a simple table in SQL 2005 Reporting Services, that I am saving out as a CSV file. This is for importing into Sage.
I need the CSV file to firstly not have any headers, which I can't see a way of doing in SQL RS, as it takes the name from the properties of the table cell naem where the value is, but would be interested if anyone has any ideas.
Secondly, I need the CSV file to be comma seperated which it is, but I also need the saved CSV file to have quotes as the text qualifier. Again there seems to be no option on this in RS. So for this I have tried ="""" & field!fieldsname & """" which displays fine when rendered, but when saved as a CSV you get """Fieldname""","""fieldna
It seems slightly mad that there is not somehow in RS to format the type of CSV file I want to save, can anyone help me?
Any help much appreciated
David
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the reply I actually used bcp in the end, and that worked fine!
ASKER
Also tries select char(34) + field1 + char34 as field1 from....
And that does the same.
Just also tried single quotes, and that works, I can put one single quote or two quotes in, but of course 2 single quotes does not equal a double quote.
I guess this just can't be done is RS, unless there are any other good ideas. I guess only other alternative is to do it solely in SQL server.