solving sql server problems for millions of dbas and developers since 2006



SQL Server DBA Tips SQL Server Developer Tips SQL Server Business Intelligence Tips SQL Server Career Tips SQL Server Whitepapers SQL Server Tools SQL Server Webcasts SQL Server Questions and Answers SQL Server Questions and Answers













SSIS - Datatype for loading from flatfile to table

Asked 1/31/2012 5:07:09 AM by Matt

Hi All,

I'm trying to load a flat file column which has a numeric value like 199.45 ( with two decimal places...but If I choose the Decimal (18,2)

Data type I get only 199.00...what is the best datatype to use for such scenarios...as at the end of Load I will be summing the column..

 

Thanks,

Matt.



Answered 1/31/2012 4:24:33 PM by RAMESH (0) vote answer is useful vote answer is NOT useful

Hi Matt,

Use Varchar datatype

It is suitable for every datatype

 


Answered 2/3/2012 9:01:27 AM by Jeremy Kadlec (0) vote answer is useful vote answer is NOT useful

Matt,

Something does not sound right.  Based on what you explained you should use a decimal or numeric data type.

Can you elaborate more on each of the places where you define the data type to see if we can narrow this down?

I am wondering if there is a data type mismatch somewhere.

Thank you,
Jeremy Kadlec


Answered 4/17/2012 7:14:14 AM by Prakash (0) vote answer is useful vote answer is NOT useful

May be you can use float data type ...it will work for sure....



Post an Answer

Keep it clean and stay on the subject or we may delete your comment.
Your email address is not published. Required fields are marked with an asterisk (*)

*Name   *Email   Notify for updates
Comments
*Enter Code refresh code


 
Sponsor Information
"Amazing, Amazing, Amazing! SQL doctor is truly one of the most powerful tools I have seen."

It takes just 5 minutes to connect your SQL Databases to source control. Got 5 minutes? Get started now.

SQL Servers keeping you up at night? Contact the Edgewood SQL Server DBAs for a Health Check. Prices start at $995.

Free Trial: Get Proactive Insight with SpotlightŪ for SQL Server Enterprise.

Solving SQL Server problems for millions of DBAs and Devs since 2006. Join now.

Free Learning - Introduction to SQL Azure Delivered by Herve Roggero on Wednesday, June 13 @ 3:00 PM EST


Copyright (c) 2006-2012 Edgewood Solutions, LLC All rights reserved
privacy | disclaimer | copyright | advertise | about
authors | contribute | feedback | giveaways | user groups
Some names and products listed are the registered trademarks of their respective owners.


Edgewood Solutions LLC | MSSharePointTips.com | MSSQLTips.com