I am sorry if this has been already answered somewhere but I have been searching for 1 1/2 days and I am on a deadline.
I have a query that I want to output like the following...
"123456","4444","This is the issue, sorry.","This is it---once again."
I can get the comma but I cannot get the double quotes around every field.
Please help...thanks Rob.
You can add the double quotes to each column, after converting the colunm to a character type where necessary
answered Oct 30, 2009 at 01:16 PM
Kev Riley ♦♦
I've always found the QUOTENAME() function to be easy to read and use. It doesn't get as confusing when concatenating long strings together.
select quotename('quotename','''') -- using two single quotes select quotename('quotename','"') -- using a double quote select quotename('quotename','') -- using brackets
answered Oct 30, 2009 at 02:14 PM
Not sure exactly what trouble you're having - it would probably help if you posted your query. Are you looking for something like this?
You can also use SSIS to output into almost any format that you can imagine.
answered Oct 30, 2009 at 01:19 PM
You an also change the behavior of double quotes with set quoted_identifier http://msdn.microsoft.com/pt-br/library/ms174393.aspx
Some examples that could be usefull:
answered Oct 30, 2009 at 01:54 PM