Hello:
Datstage ver: 8.0
Database= Oracle 10g
Source Table:
Months = Numeric Type, Length = 8
Days = Numeric Type Length = 2
The SQL:
select COL_AA_DT, COL_BB_DT, Months, Day trunc
(months_between(COL_AA_DT,COL_BB_DT )) AS months,
(trunc(COL_AA_DT)-trunc(add_months(COL_BB_DT ,trunc(months_between(COL_AA_DT,COL_BB_DT ))))) As days
from
TABLE_ABC
where (months_between(COL_AA_DT,COL_BB_DT )) > 0
The SQL creates the months and Day column.
I use this SQL in Datasge EE ver 8.0 in the Oracle Enterprise Stage. When I view the table I see the columns Months and Days with leading zeros ending with a period. EX: 00123.
I want to Trim the Leading zeros and remove the "." (period).
My target is a Dataset and the months and Days field are as follows:
Months = Numeric, Length 8
Days = Char 2
I have looked into the DSXchange but all are for Decimal to String conversion which is not applicable for me. Would appreciate if somebody could guide me with removing the leading zero's and the period with the numeric Data Type.
Thanks in advance.
MJ
Leading Zeros with Numeric Type
Moderators: chulett, rschirm, roy
Leading Zeros with Numeric Type
Thanks in advance,