Solved

decimel trncation after csv import

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
Viewers will learn how the fundamental information of how to create a table.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

729 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