Hello guys.
I have a problem.
The job is reading a DataSet that contains a Char field but with numeric content.
Example of its content: +0000000000000004574759004.0820020000000000000000000
It has 52 positions.
This number need to be inserted in a field Float( 8 ) of an SQL Server Database.
When we import the table definition through Orchestrate, the field comes as Double (without length) and we used it like this.
The thing is, I used the function StringToDecimal(<field>) before insert the value and when I check the table the value is like: 4574759004.082.
In other words, the decimal part of the number is truncated.
I've already tried lots of alternatives and they didn't work.
I am not sure whether it's about a limitation of DataStage, an SQL Server limitation or none of them.
The SQL Server is the 2008 version.
Best Regards my friends, thank you so much.
Float Numeric data truncated at the SQL Server
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
Float Numeric data truncated at the SQL Server
Joyce A. Recacho
São Paulo/SP
Brazil
São Paulo/SP
Brazil
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Each of these is the same number. Float numbers are stored in binary format - there is no need for redundant leading or trailing zeroes. When displayed, " " is used as the sign character for positive values.
The only way to re-generate the zeroes is to convert to a string.
The only way to re-generate the zeroes is to convert to a string.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm