Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BULK INSERT Problem
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 6.5 and older
Divers
Thread ID:
01357193
Message ID:
01357195
Vues:
21
It looks like the values you're trying to insert into Source_File column are longer than 50 characters.

>I have the following:
>
>DROP TABLE PartsMaster
>
>CREATE TABLE PartsMaster
>( 
>    Product_Series		VARCHAR(75), 
>    Product_Number		VARCHAR(25), 
>    Product_Name		VARCHAR(75),
>    Part_Number			VARCHAR(50),
>    Category			VARCHAR(50),
>    Keyword			VARCHAR(50),
>    Part_Description	        TEXT,
>    Description			TEXT,
>    New_part_Number		VARCHAR(25),
>    Source_File			VARCHAR(50)
>)
>
>DELETE FROM PartsMaster
>
>BULK INSERT PartsMaster 
>     FROM 'D:\Projects\Clients\Abtech\Parts List\Data\Source\prg_old_3000 server.txt' 
>    WITH 
>    ( 
>        FIELDTERMINATOR = '^', 
>        ROWTERMINATOR = '\n' 
>    )
>
>UPDATE PartsMaster SET Source_File = 'prg_old_3000 server.txt' WHERE Source_File = ''
>
>
>If I leave the 'Source_File' off the CREATE TABLE command and don't try to update the source file name, this all works fine. If I include the source file, SQL errors with
>"Bulk load data conversion error (truncation) for row 1, column 10 (Source_File)."
>
>There are multiple lines of the same error, each with varying line numbers.
>
>Anyone know what I'm doing wrong?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform