Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2008-06-15
4
Medium Priority
?
1,623 Views
Last Modified: 2010-05-18
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
Comment
Question by:bpfsr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 21789409
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
 

Author Comment

by:bpfsr
ID: 21789422
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
 

Author Comment

by:bpfsr
ID: 21789433
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
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21789444
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question