I would like to put double quotes around my text data like you have the
option to do with DTS. Can you do this with BCP? i.e. 1234, "187 Main
St", "Boston", 567, "USA"
Thanks for any tips.
Susan
Sure, take a look at BCP in BooksOnLine and take note of the FORMAT file
stuff.
Andy
"LANDGRAF" <LAND...@unhcr.ch> wrote in message
news:397C6152...@unhcr.ch...
Susan
I have several csv files which I need to import into tables on a
regular basis. I wish to automate this using bcp within stored
procedures. However, each field in the csv file has a text qualifier
eg "field1","field2","field3" etc
If you use the import facility in Access it can handle a text qualifier
with no problems at all, however it seems that bcp has no provision for
text qualifier's, it can only handle csv files in the format :
field1,field2,field3,field4
So if you atempt to bcp in a file with text qualifiers, the quote marks
will get imported into the fields along with the data. Is there a way
around this to get bcp to deal with text qualifiers or will I have to
remove them from the files first (not desirable).
It seems odd that Access would have more options in its import facility
than SQL Server! It is very common to get csv files with text
qualifiers.
On second thought, I am not sure if I have used BCP with a file using
"'s as the char markers. Well there is always DTS. You can script DTS to do
almost anything and I know it handles a text file such as this with no
problem. I import files with "'s around char fields all the time using DTS.
Andy
"LANDGRAF" <LAND...@unhcr.ch> wrote in message
news:397D6742...@unhcr.ch...
Allan
"Andrew J. Kelly" <ake...@gtmi.net> wrote in message
news:upUDy6i9$GA.301@cppssbbsa04...
Thanks for the help.
Susan
Susan
I don't think you want the quotes as the column delimiter. I believe
your looking to denote a character column by enclosing all the characters in
that column with double quotes. That's different from a column delimiter so
this would happen. I am sorry but I don't know how to accomplish this with
BCP, just DTS.
Andy
"LANDGRAF" <LAND...@unhcr.ch> wrote in message
news:397D9079...@unhcr.ch...