Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quotation marks around strings for Comma Delimited File 1

Status
Not open for further replies.

kdub72

IS-IT--Management
Jul 24, 2008
5
US
Can someone tell me how to use Query Calculation to put Quotation Marks around a string?
 
Why are you needing the quotation marks? What are you doing with the file once you have saved it as a .csv? Cognos delimits it with a tab, I believe, and I've never had any programs with using a .csv file out of cognos in another program.

What version of cognos are you on?
 
We are using version 8.2 of Report Studio. We have an external vendor who requires data be delivered in comma delimited files. My issue is that one of the fields that I am exporting contains commas within the field, thus throwing things off. I need to be able to put quotation marks around this field to keep the string intact. Does that make sense? I know there is a way to do it, I just can't figure it out.
 
Just thinking off hand, but couldn't you hard code the query items that need the quotes around them. Such as '"'+[Data Item]+'"'.

Or, could you save it to excel, and then save it as a csv from there? If its only one report it might be simpler...

Just curious, but have you been able to look at the output, I thought Cognos used a tab delimited even when using CSV format.

Todd
 
Yes -- the '"' + [Data] + '"' was the solution. I was trying to do it as a Calculation, but it should have been done on the Expression line.

Thanks for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top