sbroomfield
Programmer
Hi,
I have some SQL that I run to create output to a csv file.
This is mailed out to my users and when they open the file it opens in Excel.
This is all very good, but two of the columns contain strings that may include commas at any point in the string. This obviously buggers up the output!
I have looked at the possibility of amending those fields on the database but there are 3000 instances of these strings containing commas so I had better think about manipulating the data once I have retrieved it from the database.
Is there a way that I can specify that if there is a comma anywhere in the string, replace it with a space?
Hope someone can help,
Thanks,
Steve
I have some SQL that I run to create output to a csv file.
This is mailed out to my users and when they open the file it opens in Excel.
This is all very good, but two of the columns contain strings that may include commas at any point in the string. This obviously buggers up the output!
I have looked at the possibility of amending those fields on the database but there are 3000 instances of these strings containing commas so I had better think about manipulating the data once I have retrieved it from the database.
Is there a way that I can specify that if there is a comma anywhere in the string, replace it with a space?
Hope someone can help,
Thanks,
Steve