Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 exception with bulk insert

Author  Topic 

rajasekhar857
Constraint Violating Yak Guru

396 Posts

Posted - 2009-03-26 : 01:48:17
Hi,
i have did the following one
--CREATE TABLE TO INSERT DATA
create table EMRracelkup
(RACE_ID NUMERIC(20),
UNIQUE_IDENTIFIER VARCHAR(20),
HIERARCHICAL_CODE VARCHAR(50),
CONCEPT VARCHAR(50),
STATUS NUMERIC(10) NULL)
GO
--BULK INSERT THE DATA FORM CSV FILE
BULK
INSERT EMRracelkup
FROM 'c:\abc.txt'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
GO
--CHECKONG THE DATA IN THE TABLE
SELECT * FROM EMRracelkup
go

EXCEPTION IS
Msg 4832, Level 16, State 1, Line 1
Bulk load: An unexpected end of file was encountered in the data file.
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".
HOW TO RECTIFY THIS

and IAM GETTING ERROR LIKE
   

- Advertisement -