Solved

decimel trncation after csv import

Posted on 2014-03-04
2
282 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
My experience with Windows 10 over a one year period and suggestions for smooth operation
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now