Hi
I am capturing database rejections by adding reject link to oracle connector stage. At the other end am restructuring the same rejects as tab separated values through Column Export stage and writing them into a single column. My Job is RCP enabled. Since few columns have Decimal datatype in the Oracle database and upon any database rejections, decimal values are getting rejected with leading & trailing zero's into it.
Is there any property in Column Export stage which removes leading & trailing zeros and put's only actual decimal value. currently using Default decimal precision & scale [38,10]
eg:
If am inserting any value "44.00" into database, and rejection happens due to key violation , am getting value as
"0000000000000000000000000044.0000000000".
Can any body help.
Leading & trailing zero's in column export stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 284
- Joined: Fri Oct 13, 2006 4:31 am
If you have a sequential file, which is storing your rejects, then DataStage will always add leading zeroes to decimal values.
You may need to have a transformer before the column export stage and then convert the decimal value input into string and pass on the output as Varchar data type. The function to be used in transformer is
DecimalToString(YourColumn,"fix_zero suppress_zero")
You may need to have a transformer before the column export stage and then convert the decimal value input into string and pass on the output as Varchar data type. The function to be used in transformer is
DecimalToString(YourColumn,"fix_zero suppress_zero")
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Don't worry about it. That's now the Decimal number is displayed. It's not stored like that in a database table; it's stored in a binary format. The display format will be used if the decimal is converted to a string (e.g. for export) but, if that's the case, you can trim the leading and trailing zero characters.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Yes, In actual tables it's loading correctly.
But when any records get's rejected, All the column data will get inserted into a single column of reject table as tab separated value through Column Export stage.
In the same tab separated value column , leading & trailing values getting inserted for decimal data.
But when any records get's rejected, All the column data will get inserted into a single column of reject table as tab separated value through Column Export stage.
In the same tab separated value column , leading & trailing values getting inserted for decimal data.
Aquilis
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: