datatype problem
Moderators: chulett, rschirm, roy
datatype problem
Hi,
i have column name BAL_NAME(decimal 22,2).i have create a dummy file and give the value 345.22 while creating flat file but when in view data its showing 00000000000000000345.22 added zeros in front of values.how to get rid of zeros just want 345.22
Also for column name EFFT_DT (DATE) i enter 2011-04-03 in dummy flat file but its showing values like 40240 .Can someone helps me on this.
i have column name BAL_NAME(decimal 22,2).i have create a dummy file and give the value 345.22 while creating flat file but when in view data its showing 00000000000000000345.22 added zeros in front of values.how to get rid of zeros just want 345.22
Also for column name EFFT_DT (DATE) i enter 2011-04-03 in dummy flat file but its showing values like 40240 .Can someone helps me on this.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
DataStage always puts the zeroes in for Decimal data type, to prove that precision and scale are handled properly. You can only get rid of the zeroes if you use VarChar as the data type.
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.
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
Re: datatype problem
If hope the below answer is enough for your question, if you are still struggling to get your output.
I hope your are using transformtion stage in your job, go to column right click and go to string and you can frind trim and use this.
Regards,
Sree
[quote="hargun"]Hi,
i have column name BAL_NAME(decimal 22,2).i have create a dummy file and give the value 345.22 while creating flat file but when in view data its showing 00000000000000000345.22 added zeros in front of values.how to get rid of zeros just want 345.22
Also for column name EFFT_DT (DATE) i enter 2011-04-03 in dummy flat file but its showing values like 40240 .Can someone helps me on this.[/quote]
I hope your are using transformtion stage in your job, go to column right click and go to string and you can frind trim and use this.
Regards,
Sree
[quote="hargun"]Hi,
i have column name BAL_NAME(decimal 22,2).i have create a dummy file and give the value 345.22 while creating flat file but when in view data its showing 00000000000000000345.22 added zeros in front of values.how to get rid of zeros just want 345.22
Also for column name EFFT_DT (DATE) i enter 2011-04-03 in dummy flat file but its showing values like 40240 .Can someone helps me on this.[/quote]
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
-
- Participant
- Posts: 11
- Joined: Sat Mar 13, 2010 12:00 am