Here is my finding using a format file to do the bulk insert:
I generated the format file (attached here for your convenient, please change Employee.fmt.txt back to Employee.fmt) using:
bcp AdventureWorks2008.HumanResources.Employee format nul -T -N -f C:\Data\Employee.fmt
Here is the format file:
10.0
16
1 SQLINT 0 4 "" 1 BusinessEntityID ""
2 SQLNCHAR 2 30 "" 2 NationalIDNumber SQL_Latin1_General_CP1_CI_AS
3 SQLNCHAR 2 512 "" 3 LoginID SQL_Latin1_General_CP1_CI_AS
4 SQLUDT 8 0 "" 4 OrganizationNode ""
5 SQLSMALLINT 1 2 "" 5 OrganizationLevel ""
6 SQLNCHAR 2 100 "" 6 JobTitle SQL_Latin1_General_CP1_CI_AS
7 SQLDATE 0 3 "" 7 BirthDate ""
8 SQLNCHAR 2 2 "" 8 MaritalStatus SQL_Latin1_General_CP1_CI_AS
9 SQLNCHAR 2 2 "" 9 Gender SQL_Latin1_General_CP1_CI_AS
10 SQLDATE 0 3 "" 10 HireDate ""
11 SQLBIT 1 1 "" 11 SalariedFlag ""
12 SQLSMALLINT 0 2 "" 12 VacationHours ""
13 SQLSMALLINT 0 2 "" 13 SickLeaveHours ""
14 SQLBIT 1 1 "" 14 CurrentFlag ""
15 SQLUNIQUEID 1 16 "" 15 rowguid ""
16 SQLDATETIME 0 8 "" 16 ModifiedDate ""
I then use the following bcp command:
bcp AdventureWorks2008.HumanResources.Employee in C:\Data\EmployeeDataCommaDelimited.csv -f C:\Data\Employee.fmt -S -T
(For the convenience, I also attached the csv data file here, please change the file extension by removing the .txt)
I received the same EOF error.
Anything I did wrong?:crazy:
Can any one repeat the export and import using bcp?
Thanks.