Information générale
Forum:
Microsoft SQL Server
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement