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
An additional space is prefixed for the decimal fields
Moderators: chulett, rschirm, roy
have a look at this post for more details.
viewtopic.php?t=124275
viewtopic.php?t=124275
Two wrongs don't make a right. But three lefts do.
I found out the reason for that. That space is to display the sign of the number. If its a positive number, we have a space preceeding the number. Ex: 8.54 would be " 000008.54". If its a negative number, the number will be preceeded by a minus(-) sign. Ex: -8.54 would be "-000008.54"vasa_dxx wrote:have a look at this post for more details.
viewtopic.php?t=124275
Kiran