Page 1 of 1

issues in data transformation decimal to integer

Posted: Fri Sep 17, 2010 12:03 pm
by madhav62
Hi,
I am doing transformation on decimal value to feed into flatfile
incoming data has field which is decimal(with two decimal places) i need to convert it into integer in COBOL format 9(6)v9(3)
i am using derivation right("0000000000":(column.value*1000),9)
it works fine with some value expect for value like 456783.235
the value it show as 56783e+8 but i am expecting the value
456783235.
can any tel me what want wrong?

Re: issues in data transformation decimal to integer

Posted: Fri Sep 17, 2010 1:47 pm
by divesh
Looks like your target field datatype is double/dfloat after the transformation.
Can you try making it Integer 10

Re: issues in data transformation decimal to integer

Posted: Sat Sep 18, 2010 11:55 am
by madhav62
divesh wrote:Looks like your target field datatype is double/dfloat after the transformation.
Can you try making it Integer 10
Its actually varchar(9)

Posted: Sun Sep 19, 2010 2:21 am
by ray.wurlod
VarChar(9) is not big enough - you need at least VarChar(11) - you have nine significant digits, a sign and a decimal placeholder. Where do you expect the third decimal place to come from, given that your source column only has two?

Posted: Sun Sep 19, 2010 8:15 am
by madhav62
ray.wurlod wrote:VarChar(9) is not big enough - you need at least VarChar(11) - you have nine significant digits, a sign and a decimal placeholder. Where do you expect the third decimal place to come from, given that your source column only has two?
Source column has three decimal places. is there any other way to declare the value.

Re: issues in data transformation decimal to integer

Posted: Sun Sep 19, 2010 2:02 pm
by ray.wurlod
madhav62 wrote:incoming data has field which is decimal(with two decimal places)
Sorry, I was tricked by this statement in your original post.