[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1645
  • Last Modified:

Error message with bulk load in SQL Server 2005 - Msg 4863, Level 16, State 1, Line 1

I am trying to bulk load data into sql server 2005, I have set up using the following query:

create table BookitTest
(
SKU varchar (15),
ISBN varchar (10),
Title varchar (150),
Condition varchar (25)
)
BULK INSERT BookitTest
    FROM 'C:\My Documents\Softbyte Files\3729638.csv'
    WITH
    (
        FIELDTERMINATOR = ',',
        ROWTERMINATOR = '\n'
    )

and I am getting the following error message:
Msg 4863, Level 16, State 1, Line 1
Bulk load data conversion error (truncation) for row 2, column 4 (Condition).

Any ideas how to fix this?
0
bpfsr
Asked:
bpfsr
  • 2
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
that error means that in row 2, the value in the file for field Condition is longer than 25 characters.
to "solve", increase the column size for the condition:


create table BookitTest
(
SKU varchar (15),
ISBN varchar (10),
Title varchar (150),
Condition varchar (50)
)

Open in new window

0
 
bpfsrAuthor Commented:
I thought it might be that so I checked the length of the cells in question and none of them were even longer than 10 characters...
0
 
bpfsrAuthor Commented:
It occurred to me "condition" might be a reserved term so I changed the name of the column and changed the length of the varchar and it did work, thanks.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
the list of reserved keywords in sql 2000 and 2005:
http://msdn.microsoft.com/en-us/library/aa238507(SQL.80).aspx
http://msdn.microsoft.com/en-us/library/ms189822.aspx

"condition" is not in the list...
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now