Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BULK INSERT Problem
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 6.5 and older
Miscellaneous
Thread ID:
01357193
Message ID:
01357451
Views:
16
An UPDATE statement wouldn't generate "Bulk load ..." error.

>I'm not doing an insert into the column, I'm doing an update (below the BULK INSERT command).
>The name I'm trying to add to the row is 23 characters long.
>
>
>
>>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--
Previous
Reply
Map
View

Click here to load this message in the networking platform