Source is sequential file varchar datatype. Althought its decimal, I am reading as varchar and converting in the transofrmer to decimal.
Target is Sybase float datatype.
source_value = 499000
My transform is: stringtodecimal(source_value)/100000
result should have been 4.99,
but in the table the value is written as: 4.98999768511111.
I tried DecimaltoDfloat(stringtodecimal(source_value)/100000), still same result.
When I do a Peek on the same, value is shown as 4.99
I have seen several posts on the forum where float datatype is an issue. There are posts suggesting using DFloatToStringNoExp to read floats, but couldn't find anything on writing float datatype to the database. Your help is greatly appreciated.
Problem writing Float to Sybase
Moderators: chulett, rschirm, roy
Hi,
What is the meta data of the DS column definition and the target table definition?
what is set in environment variable that effect the precisoin both for DS and Sybase?
What is the meta data of the DS column definition and the target table definition?
what is set in environment variable that effect the precisoin both for DS and Sybase?
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Target sybase column datataype is float.roy wrote:Hi,
What is the meta data of the DS column definition and the target table definition?
what is set in environment variable that effect the precisoin both for DS and Sybase?
DS column is float (15). It I change DS column from float to decimal I get a run-time error and the job aborts. So I had to stick with float.
APT_DECIMAL_INTERM_SCALE = 10 is for this project.
I was able to fix this issue by using BASIC transformer and SybaseOC stage (instead of Parallel Transformer & Sybase Enterprise stages) and changing DS column metadata to Decima (15,5).