Discussion:
BCP or Bulk Insert file containing quoted strings, embedded delimiters
(too old to reply)
Robert Tuck
2003-12-10 20:08:09 UTC
Permalink
Hi,
Anyone know if it is possible to use Bulk Insert or BCP commands to
import a text file into SQL 2000 which contains single or double quotes
around string values, and tell it to ignore any embedded column delimiters?

1 Row Example:

9382,"Test, Description",349.00,"N","Joe Smith"

(Needs to ignore the comma in "Test, Description" and possibly remove the
double quotes.)

Thanks,
Robert
lindawie
2003-12-10 20:18:10 UTC
Permalink
Robert,
Post by Robert Tuck
Hi,
Anyone know if it is possible to use Bulk Insert or BCP
commands to import a text file into SQL 2000 which contains
single or double quotes around string values, and tell it to
ignore any embedded column delimiters?
9382,"Test, Description",349.00,"N","Joe Smith"
(Needs to ignore the comma in "Test, Description" and possibly
remove the double quotes.)
You can use a bcp format file for this. Some examples:

http://www.google.com/groups?q=+first_quote+author:lindawie


Linda
Robert Tuck
2003-12-10 20:27:00 UTC
Permalink
Dang, that was fast! I'll check it out. Thanks, Lindawie!
Post by lindawie
Robert,
Post by Robert Tuck
Hi,
Anyone know if it is possible to use Bulk Insert or BCP
commands to import a text file into SQL 2000 which contains
single or double quotes around string values, and tell it to
ignore any embedded column delimiters?
9382,"Test, Description",349.00,"N","Joe Smith"
(Needs to ignore the comma in "Test, Description" and possibly
remove the double quotes.)
http://www.google.com/groups?q=+first_quote+author:lindawie
Linda
Code The Crab
2020-08-28 11:37:59 UTC
Permalink
Dang, that was fast! I'll check it out. Thanks, Lindawie!
Post by lindawie
Robert,
Post by Robert Tuck
Hi,
Anyone know if it is possible to use Bulk Insert or BCP
commands to import a text file into SQL 2000 which contains
single or double quotes around string values, and tell it to
ignore any embedded column delimiters?
9382,"Test, Description",349.00,"N","Joe Smith"
(Needs to ignore the comma in "Test, Description" and possibly
remove the double quotes.)
http://www.google.com/groups?q=+first_quote+author:lindawie
Linda
seems you were successfull in doing the above operation can you reshare the link or copy the solution over here.
The above link is expired.

Thankyou in Advance
Michael Cole
2020-08-31 10:15:30 UTC
Permalink
Post by Code The Crab
Dang, that was fast! I'll check it out. Thanks, Lindawie!
Post by lindawie
Robert,
Post by Robert Tuck
Hi,
Anyone know if it is possible to use Bulk Insert or BCP
commands to import a text file into SQL 2000 which contains
single or double quotes around string values, and tell it to
ignore any embedded column delimiters?
9382,"Test, Description",349.00,"N","Joe Smith"
(Needs to ignore the comma in "Test, Description" and possibly
remove the double quotes.)
http://www.google.com/groups?q=+first_quote+author:lindawie
Linda
seems you were successfull in doing the above operation can you reshare the
link or copy the solution over here. The above link is expired.
Thankyou in Advance
Possibly because the message itself was from 2003, which is almost 17
years ago. As such, the chance of the OP actually reading this
response is rather remote.

Loading...