Problem while Reading Float DataType from DataBase
Moderators: chulett, rschirm, roy
Problem while Reading Float DataType from DataBase
Hi ,
I am trying to read a column BMIPercentile defined as FLOAT in SQL Server Database using ODBC Connector Stage. I have specified column definition as Type=Float , Length=53 , Scale=10.
My Job is aborting with below Fatal error .
Schema reconciliation detected a size mismatch for column BMIPercentile. When reading database column DFLOAT into column SFLOAT, truncation, loss of precision or data corruption can occur
Let me know what should be the correct Column definition to be defined ?
I am trying to read a column BMIPercentile defined as FLOAT in SQL Server Database using ODBC Connector Stage. I have specified column definition as Type=Float , Length=53 , Scale=10.
My Job is aborting with below Fatal error .
Schema reconciliation detected a size mismatch for column BMIPercentile. When reading database column DFLOAT into column SFLOAT, truncation, loss of precision or data corruption can occur
Let me know what should be the correct Column definition to be defined ?
Mandy
Re: Problem while Reading Float DataType from DataBase
If you will not get really large numbers, cast to decimal data type in query.
I have the same issue. I'm reading a source table with a column defined as a FLOAT in SQL Server Database using ODBC Connector Stage. Exact same definition as post in the OP.
What is meant by 'cast to decimal type in query'. Is this writing an SQL query and doing a conversion on the column from a FLOAT to a DECIMAL? Would FLOAT be left as the column type in the column tab?
Thanks!
What is meant by 'cast to decimal type in query'. Is this writing an SQL query and doing a conversion on the column from a FLOAT to a DECIMAL? Would FLOAT be left as the column type in the column tab?
Thanks!
CAST function. As to your last question - no, it would be whatever data type you are casting to.iq_etl wrote:What is meant by 'cast to decimal type in query'.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
This worked. I previously understood that Double was reserved for very long numbers. Is using Double a best practice here due to the nature of SQL Server database or should I go with CAST?ray.wurlod wrote:Specify Double as the data type the DataStage table definition. Some databases, including Sybase and SQL Server, report Float for DFloat data types.
Thanks!