I have a job that loads value data into a DB2 table. The source file has the values stored as a BigInt (15) whereas the target is set to Decimal (15,2).
As the source values are in pence and we want to load as pounds I am dividing the source value by 100.
So if my source value is 2079, I want to load it as 20.79 but when I run the job it is being loaded as 20.00 and the 'pence' value is being lost.
Any suggestions ?
Losing Decimal Values
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Try Decimal(17,2). The precision figure includes the scale digits.
Or try Oconv(InLink.TheAmount, "MD2") as your conversion.
AsDouble() and AsFloat() are pertinent only to parallel jobs.
Or try Oconv(InLink.TheAmount, "MD2") as your conversion.
AsDouble() and AsFloat() are pertinent only to parallel jobs.
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.