An additional space is prefixed for the decimal fields
Posted: Wed Dec 24, 2008 4:36 am
Hi all,
I have a strange problem in my datastage code.
I am reading data from an Oracle Enterprise stage. I have few fields which are defined as Number(38,10). In the DataStage code(oracle stage) these fields are defined as Decimal(8,2). So, i am casting these fields to Number(8,2) in the SQL query using - CAST(FieldName AS NUMBER(8,2)).
Now, when i am reading the data, i am able to see a space preceeding each value. For Ex: If the value for this field in Oracle is 8.75, its read in DS Oracle Ent stage as " 000008.75". And my target data also has this space.
How can i avoid this? Please share with me the soultion if you have.
Thanks,
Kiran
I have a strange problem in my datastage code.
I am reading data from an Oracle Enterprise stage. I have few fields which are defined as Number(38,10). In the DataStage code(oracle stage) these fields are defined as Decimal(8,2). So, i am casting these fields to Number(8,2) in the SQL query using - CAST(FieldName AS NUMBER(8,2)).
Now, when i am reading the data, i am able to see a space preceeding each value. For Ex: If the value for this field in Oracle is 8.75, its read in DS Oracle Ent stage as " 000008.75". And my target data also has this space.
How can i avoid this? Please share with me the soultion if you have.
Thanks,
Kiran