Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Importing data from text file to SQL table...
Message
De
03/04/2002 01:31:10
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Importing data from text file to SQL table...
Divers
Thread ID:
00640235
Message ID:
00640235
Vues:
73
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
Fil
Voir

Click here to load this message in the networking platform