Solved

SSIS - Importing scientific notation field to SQL DB using SSIS

Posted on 2014-07-24
3
462 Views
Last Modified: 2016-02-11
Hi

I am trying to import a column from an excel source. It has a "general" type in excel and therefore shows as follows: 8.938E+19

I want to import it into SQL by showing it as its numeric value of:  89380000000004700000

I am attempting to use a derived column and would like to know what I should convert it to in order to import it into the DB.
0
Comment
Question by:devguru001
[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
3 Comments
 
LVL 65

Accepted Solution

by:
Jim Horn earned 500 total points
ID: 40217479
Since we're talking 20 digits, and bigint only supports 19, you'll have to use numeric.
-- This works
SELECT CAST(89380000000004700000 as numeric(30,0)) 

Open in new window

btw if this value is not going to be searched much, or used in an expression, you can consider a char data type.
0
 

Author Comment

by:devguru001
ID: 40218706
Hi Jim,

I defined the table column as nvarchar100.
I have a derived column in my ssis package: (DT_NUMERIC,30,0)[fieldtocast].
It still shows in scientific notation after running the package. Any thoughts?
0
 

Author Comment

by:devguru001
ID: 40223588
My source data supplier was willing to change the column from "General" to "Number".
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Here's a requirements document template for an integration project (also known as Extract-Transform-Load or ETL) based on my development experience as an SQL Server Information Services (SSIS) developer over the years.
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…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

726 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