?
Solved

ssis does not convert decimal positions correctly

Posted on 2011-03-04
9
Medium Priority
?
894 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
[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
  • 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 2000 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
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 

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
 
LVL 15

Assisted Solution

by:derekkromm
derekkromm earned 2000 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

770 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