Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Importing data from text file to SQL table...
Message
From
03/04/2002 01:31:10
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Importing data from text file to SQL table...
Miscellaneous
Thread ID:
00640235
Message ID:
00640235
Views:
72
Hi All,

I am new to SQL server and trying to import data from a text file to a table. Just tried to excecute a sample code from help..

BULK INSERT pubs..publishers5 FROM 'c:\newpubs.dat'
WITH (
DATAFILETYPE = 'char',
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
( Here I have created a publishers5 table which has the same structure as publishers table)

On execution of this code, its giving me errors..

Server: Msg 4863, Level 16, State 1, Line 1
Bulk insert data conversion error (truncation) for row 2, column 1 (pub_id).
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'STREAM' reported an error. The provider did not give any information about the error.
The statement has been terminated.

I will be very greatful if anyone can shed some light on this. Or is there any other way to achive this?

Thanks in advance,
Shilpa
Next
Reply
Map
View

Click here to load this message in the networking platform