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 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Exporting to CSV (quoted and unquoted)

Author  Topic 

axisperfect
Starting Member

21 Posts

Posted - 2004-11-06 : 00:57:39
I've got a working export DTS package that'll dump data into a CSV file, using what I think is DSN connection/Microsoft Text (*.txt, *.csv) connection. (I can't remember how this was done! )

The problem is all the values that get dumped in to the CSV file are quoted, when some of them need to be unquoted, numeric values. Is there a way to specify which columns ought to be quoted and unquoted in a DSN connection/Microsoft Text (*.txt, *.csv) connection? Somewhere when defining the DSN or the file itself? [I tried changing the column values (which are all CHAR) in the destination tab, but it told me it was readonly].

Alternatively, I tried converted the connection to a "Text File (Destination)" connection instead, but I crashed my Enterprise Manager when trying to define ~150 columns. (No, we're not pulling out 150 columns work of data, but the CSV has to be in a certain format to put imported into another system, so those headers have gotta be defined in the file.) And, preferably, I'd rather not re-do it using "Text File (Destination)" connections-- it's A LOT to redo.

Any suggestions? Ideas?

Thanks!

ap--(hope I'm not being too incoherent; too many things going wrong

Kristen
Test

22859 Posts

Posted - 2004-11-06 : 02:09:05
Don't know much about BCP, but would that let you do it with a "template"?

I hate CSV - so many different definitions of "what makes a good CSV file". Roll on XML ...

Kristen
Go to Top of Page
   

- Advertisement -