Scale value is missing for FLOAT column

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
PeteM2
Premium Member
Premium Member
Posts: 44
Joined: Thu Dec 15, 2011 9:17 am
Location: uk

Scale value is missing for FLOAT column

Post by PeteM2 »

Hi,

I am trying to pull the FLOAT column from my source (SQL SERVER) through DRS/ODBC connector. Value in source is '7.59999990463257'. But once I extract this value into dataset through datastage extraction job, I am able to see '7.6' if I use 'double' datatype. Busiess wants the complete value from source to target. My target is oracle and the datatype in oracle for this column is 'NUMBER'. I tried with different datatypes available in datastage, but not getting exact value like source. And one more thing, scale length is not fixed. As it is mentioned as FLOAT, 'dot' can come at any place. I am able to get exact value of source if I use 'decimal(38,14) in datastage. But we can not define the scale length as '14' as few source records are having 15 digits after 'dot'.
Could you please assist on this?

I tried with all possible datatypes in datastage like real, double, float, varchar but no use.
thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Pete, split you into your own topic.

Original discussion is here.
-craig

"You can never have too many knives" -- Logan Nine Fingers
JRodriguez
Premium Member
Premium Member
Posts: 425
Joined: Sat Nov 19, 2005 9:26 am
Location: New York City
Contact:

Post by JRodriguez »

Hi Pete,
On the source try defining the column as dfloat, and the oracle target as decimal with the proper precision and scale to fit your values. You would need to use dfloattodecimal function

While checking the values out of your source take in consideration that the values will be affected by the default set in the APT_DECIMAL_INTERM_PRECISION and APT_DECIMAL_INTERM_SCALE.....check what's the default of the scale one in the DS project and adjust accordingly

Regards
Julio Rodriguez
ETL Developer by choice

"Sure we have lots of reasons for being rude - But no excuses
Post Reply