Remove leading zeros from decimal datatype
Posted: Mon Dec 27, 2004 3:43 pm
Hi,
I have PX job that reads the DECIMAL(9,2) type data from a UDB table and write into a sequential file. Since the data type is DECIMAL(9,2) for one the column, the leading zeros were also written into sequential file.
Example: Output data in Seq file:
Column A
0000002.50
0000001.00
Expected output
Column A
2.50
1.00
Can someone please let me know how to remove leading zeros.
Is there any function in UDB which does this. So that i can modify the SQL and I don't have to do any transformations in datastage.
I have PX job that reads the DECIMAL(9,2) type data from a UDB table and write into a sequential file. Since the data type is DECIMAL(9,2) for one the column, the leading zeros were also written into sequential file.
Example: Output data in Seq file:
Column A
0000002.50
0000001.00
Expected output
Column A
2.50
1.00
Can someone please let me know how to remove leading zeros.
Is there any function in UDB which does this. So that i can modify the SQL and I don't have to do any transformations in datastage.