[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 904
  • Last Modified:

ssis does not convert decimal positions correctly

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
qbjgqbjg
Asked:
qbjgqbjg
  • 5
  • 2
2 Solutions
 
jijeeshCommented:
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
 
derekkrommCommented:
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
 
qbjgqbjgConsultantAuthor Commented:
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
qbjgqbjgConsultantAuthor Commented:
Thanks for removing Crystal as a zone. I did not add it. It must have remained from my previous question.
0
 
derekkrommCommented:
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
 
qbjgqbjgConsultantAuthor Commented:
Thanks, I will not have access to try it until Monday. I will try it then.
0
 
qbjgqbjgConsultantAuthor Commented:
It worked. Thanks.
0
 
qbjgqbjgConsultantAuthor Commented:
Thanks so much. I appreciate your help.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now