Re: BCP Import error -
11-03-2003
, 04:15 AM
start with a simple example that works and build on that.
This works
bcp file
1;1
2;2
format file
7.0
2
1 SQLCHAR 0 4 ";" 1 a
2 SQLCHAR 0 4 "\r\n" 2 b
drop table ##a
go
create table ##a
(
a int ,
b int
)
exec master..xp_cmdshell 'bcp ##a in c:\bcp.txt -S(local) -Usa -Ppwd
-fc:\bcpfmt.txt'
this also works
bcp file
1;1;hello
2;2;hello
format file
7.0
3
1 SQLCHAR 0 4 ";" 1 a
2 SQLCHAR 0 4 ";" 2 b
3 SQLCHAR 0 100 "\r\n" 3 c
drop table ##a
go
create table ##a
(
a int ,
b int ,
c varchar(100)
)
looking at yours you have "" as the terminator on the last field
trying that it gives Unexpected EOF encountered in BCP data-file
This will give you a method of finding the problem
Nigel Rivett
www.nigelrivett.net
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! |