Solved

ssis does not convert decimal positions correctly

Posted on 2011-03-04
9
876 Views
Last Modified: 2012-05-11
I am converting an excel to sql using ssis import/export wizard. The problem I am having is, one of my fields has 5 decimal positions. SSIS converts it to 2. What do I need to do to correct that issue.
0
Comment
Question by:qbjgqbjg
  • 5
  • 2
9 Comments
 
LVL 5

Expert Comment

by:jijeesh
ID: 35040704
You can do it in "Advanced Editor"

Right Click on the "Excel Source" in Data flow task
Go "Show Advanced Editor"
Goto Input Output Properties tab and update your column's datatype as required.
0
 
LVL 15

Accepted Solution

by:
derekkromm earned 500 total points
ID: 35041521
When you define a numeric variable in SQL, there are 2 parameters: precision and scale

So if the datatype is numeric(18, 5), it means you can have 18 digits total and 5 of them can be to the right of the decimal place.

So you'll need to define your data type as a numeric(??, 5), depending on how large your #s get.
0
 

Author Comment

by:qbjgqbjg
ID: 35043732
So, if I change the data type to decimal(18,5) it should work. Can I do that under the wizard? Would I still need to change it in the Excel?
0
 

Author Comment

by:qbjgqbjg
ID: 35043991
Thanks for removing Crystal as a zone. I did not add it. It must have remained from my previous question.
0
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
LVL 15

Assisted Solution

by:derekkromm
derekkromm earned 500 total points
ID: 35044964
Yes, when you're on the "Select Source Tables and Views" portion, click "Edit Mappings"

From there, you should see the Precision/Scale columns and can change your definitions accordingly.
0
 

Author Comment

by:qbjgqbjg
ID: 35046155
Thanks, I will not have access to try it until Monday. I will try it then.
0
 

Author Comment

by:qbjgqbjg
ID: 35058415
It worked. Thanks.
0
 

Author Closing Comment

by:qbjgqbjg
ID: 35058427
Thanks so much. I appreciate your help.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

757 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

23 Experts available now in Live!

Get 1:1 Help Now