General information
Forum:
Microsoft SQL Server
Title:
Importing data from text file to SQL table...
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only