Solved

decimel trncation after csv import

Posted on 2014-03-04
2
299 Views
Last Modified: 2014-03-04
There is a table Within the sql server  - the format of that  column in decimal(18, 0)
When I import the csv data into that sql server table and then compare the imported data to the original data – this is what I see –
The decimals are getting truncated resulting in 7000 less – how to fix this?

Original CSV Data      Imported Data in SQL Server
14010.1      14010
18283.56      18283
14745.5      14745
2102.211429      2102
2437.57      2437
2452.58      2452
2437.57      2437
2452.58      2452
2437.57      2437
2452.58      2452
2437.57      2437
2452.58      2452
2437.57      2437
2452.58      2452
2437.57      2437
2452.58      2452


thank you
0
Comment
Question by:Rayne
2 Comments
 
LVL 11

Accepted Solution

by:
Simone B earned 500 total points
ID: 39904867
The "0" in your data type DECIMAL(18,0) indicates that there are to be no decimals. You would need to change this in the table to the number of decimals you need. Eg DECIMAL(18,2)
0
 

Author Comment

by:Rayne
ID: 39904887
thank you Simone :)
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
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.
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

839 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