Numeric to decimal Data Type problem
Moderators: chulett, rschirm, roy
Numeric to decimal Data Type problem
Hi,
I am reading data as numeric(9,3) and the data is like 1.22,1.00,0.00.1.234,1.230
and want the output data in the below format as
1.22,1,0,1.234,1.23
how to achieve this?
Thanks,
kd813
I am reading data as numeric(9,3) and the data is like 1.22,1.00,0.00.1.234,1.230
and want the output data in the below format as
1.22,1,0,1.234,1.23
how to achieve this?
Thanks,
kd813
Re: Numeric to decimal Data Type problem
Hi,kd813 wrote:Hi,
I am reading data as numeric(9,3) and the data is like 1.22,1.00,0.00.1.234,1.230
and want the output data in the below format as
1.22,1,0,1.234,1.23
how to achieve this?
Thanks,
kd813
are you talking about remove null/0 values which are placed after decimal point, say 1.00 to 1, is it ? Can you provide some more info for better understanding
-
- Premium Member
- Posts: 224
- Joined: Tue Sep 24, 2002 7:32 am
- Location: Denver, CO USA
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The easiest solution is to use a server job or a "BASIC Transformer" stage in a parallel job. Simply add 0 to the number; DataStage BASIC returns the shortest possible string for each arithmetic result.
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.
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Read it as 'Real' (9,3) you will get the output you asked for.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Just write what ever you read from the source as 'Real' to a peek or a file with final source value as VARCHAR and see the result.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>