Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Exporting to CSV format

Author  Topic 

outshined
Starting Member

1 Post

Posted - 2007-01-22 : 15:38:02
I need to export various tables (over 5k records) to CSV format to import the data to a CRM (a web based customer relationship management).

The problem is my nvarchar fields have commas in them. So I cannot map the fields correctly and some characters are not displayed properly.

What is the best procedure?

I also tried to export to Excel then CSV but it uses ; as delimiter which is not compatible.

nr
SQLTeam MVY

12543 Posts

Posted - 2007-01-22 : 16:49:10
quote encapsulate the character data or use | or ^ or |^ as delimiter.
Have a look at
http://www.simple-talk.com/sql/database-administration/creating-csv-files-using-bcp-and-stored-procedures/

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -