Solved

ssis does not convert decimal positions correctly

Posted on 2011-03-04
9
879 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

776 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