473,320 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to onstruct the BCP or the Microsoft SQL Server to ingore the right truncation er

I have a file with the stock information, such as ticker and stock price. The file was loaded to database table using freebcp. The stock price format in the file is like: 23.125. The stock price data type in database table is [decimal](28, 2). freebcp loaded the data to the table without any problem by ignoring the last digit: 23.12 was loaded to the table column of the record. We are now using Microsoft SQL Server's bcp utility (Version: 11.0 ) to load the data. However we now encounter an issue: bcp considers loading 23.125 to decimal(28.2) is an error (#@ Row 783, Column 23: String data, right truncation @#). It rejected the record.

I didn't want to modify the input file, because there are a lot of columns in the file need to be fixed by removing the last digit of columns.

Are there any ways to construct the BCP or the Microsoft SQL Server to ingore the right truncation error?

Thanks.

Charlie
Sep 29 '15 #1
1 1893
ck9663
2,878 Expert 2GB
How about increasing the size of your target table?

~~ CK
Sep 29 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: hharry | last post by:
Hello All, I am attempting a bulk load of fixed position flat file data via bcp and I have noticed that I get a Right Truncation error when trying to load a row where the last column value is...
10
by: joel.brewster | last post by:
We have a VB6 application using ADO version 2.5 and I am receiving a " CLI0109E String data right truncation. SQLSTATE=22001" error when I execute the rs.UpdateBatch method. I have determined...
1
by: gimme_this_gimme_that | last post by:
When you get the message : String data right truncation. SQLSTATE=22001 What is usually the source of the problem? Might a null value assigned get a PreparedStatement's setString method be...
1
by: Dave | last post by:
I am creating the setup for the .NET project. The project contains several OLE Automation Servers (.exe) I am having troubles toadd required registration information for these servers to the...
2
by: mudassir.latif | last post by:
Hi, I'm trying to upload a large number of log entries currently stored as text files into a database table using bcp. For a few rows I get a "right truncation" error and the offending rows are...
2
by: roha_78 | last post by:
COM.ibm.db2.jdbc.DB2Exception: CLI0109E String data right truncation. SQLSTATE=22001 at com.ibm.ejs.container.ContainerManagedBeanO.postCreate(ContainerManagedBeanO.java:500) at...
2
by: roha_78 | last post by:
i am using the follwing code to connect to db2 : java.sql.Connection connection = null; java.sql.ResultSet rs = null; ExperimentJDBCHelperBean jdbchelper = new ExperimentJDBCHelperBean();...
0
by: Brenda | last post by:
We are on DB2, AIX fixpak 14 This error happens when running PeopleSoft PeopleCode Application Engine process. I have checked other posts out here and it seems like others who have reported...
1
by: deepthisoft | last post by:
hai, In my application i am using the MVC (JSP,Servlet,Bean) architecture. In that a am trying to insert a record in the table in sqlserver.I got the error message ODBC SQL server Driver...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.