I am having difficulty importing a fairly simple text file into SQL Server using bcp. The following is an example of a text file I am trying to import along with a command line that I am using to run bcp.
NAME,ADDRESS
"LEARY,MARK","10943 IRONWOOD RD"
"COSGROVE,CHRISTOPHER","7414 MESA COLLEGE DR #39"
"HENRY,H L","4441 CAMROSE AVE"
bcp CCOR.dbo.tblTest in Test.txt -c -q -Swebsrv -Usa -Pdantes -t,
My table (which has two varchar columns Name & Address) does not contain the correct data after importing this file. Some of the name ends up in the Address column. The double quotes seem to be throwing it off. Can someone suggest a command line or Format file that can be used to import this data.
Thanks,
Paul Irwin
NAME,ADDRESS
"LEARY,MARK","10943 IRONWOOD RD"
"COSGROVE,CHRISTOPHER","7414 MESA COLLEGE DR #39"
"HENRY,H L","4441 CAMROSE AVE"
bcp CCOR.dbo.tblTest in Test.txt -c -q -Swebsrv -Usa -Pdantes -t,
My table (which has two varchar columns Name & Address) does not contain the correct data after importing this file. Some of the name ends up in the Address column. The double quotes seem to be throwing it off. Can someone suggest a command line or Format file that can be used to import this data.
Thanks,
Paul Irwin