Solved

decimel trncation after csv import

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

685 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