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)
 Excel and Double quotes(") and bcp

Author  Topic 

X002548
Not Just a Number

15586 Posts

Posted - 2004-01-07 : 13:36:05
Does ANYONE knowwhy Excel saves text with double quotes arounf text when it has a comma....it nade sense for csv, but for TAB, it makes NO SENSE...

Also why if I do a bcp with out a format file, it ignores the quotes (like access or excel) but with a format file (tab delimted) it brings them in, and with csv, it hoses the import...

It's been a long week....



Brett

8-)

X002548
Not Just a Number

15586 Posts

Posted - 2004-01-07 : 14:00:03
Doesn't bcp have a text qualifier option...LIKE EVERYTHING ELSE?



Brett

8-)


It can't be...
quote:

-q

Executes the SET QUOTED_IDENTIFIERS ON statement in the connection between the bcp utility and an instance of SQL Server. Use this option to specify a database, owner, table, or view name that contains a space or a quotation mark. Enclose the entire three-part table or view name in double quotation marks (" ").





But DTS has that option!

keep on swimming...keep on swimming...keep on swimming...keep on swimming...

Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2004-01-07 : 15:03:41
NO!

Would you like to by a used car? OK, but it doesn't come with a fuel filter...or pump...


http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=29913&SearchTerms=text,qualifier,bcp
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=28637&SearchTerms=text,qualifier,bcp
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=28499&SearchTerms=text,qualifier,bcp
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=23782&SearchTerms=text,qualifier,bcp

Unless ALL of your data has 2x quotes or none your hosed...

Now its on to load work tables...and then dynamic updates to remove the "offending" quotes...

Guess this is one the MS team didn't think was important enough to fix, with DTS...

oye



Brett

8-)
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2004-01-07 : 15:07:13
Other "minor" inconveniences...

http://support.microsoft.com/default.aspx?scid=%2Fservicedesks%2Fbin%2Fkbsearch.asp%3FArticle%3D300640



Brett

8-)
Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2004-01-07 : 15:07:38
Brett,

You're doing a great job here supporting your own thread. Wish I could be of more help.

After the DTS work I've done, the next time I write a DTS import, I'm going to import the text a line at a time to avoid the cryptic errors and syntax issues.

Parse the data using a SQL stored proc.

Sam
Go to Top of Page
   

- Advertisement -