Page 1 of 1

Change Capture Real Type

Posted: Mon Mar 23, 2009 9:55 am
by seanc217
Hi

I am attempting to do change capture on SQL Server source into Oracle Target. The SQL Server has fields with type Real which gets imported into DataStage as type Float. When I run it through the change capture, I am getting differences even though the values are the same. Also it appears DataStage is rounding the value.

Here's an example:

SQL Server value: 134623.5
Oracle Value: 134623.5

However If I place this in a peek stage, it shows as: 134624

Any ideas?

Posted: Mon Mar 23, 2009 2:59 pm
by ray.wurlod
You might like to search here and elsewhere to learn why computers can not precisely store real (sfloat or dfloat) numbers.

Convert to decimal before effecting any comparison - you can preserve the floating point numbers, but compare the decimal numbers.

Posted: Mon Mar 23, 2009 3:04 pm
by seanc217
Yeah that's the way I was going. Thanks Ray.