To supress Zero in decimal colm
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 12
- Joined: Tue Aug 26, 2008 11:05 pm
- Contact:
To supress Zero in decimal colm
Hi ,
From source(teradata) I am extracting a decimal coln with datatype decimal(6) and putting it in to a text file with datatype(decimal(6)).My problem is ,for source value 500 i am getting output as [b]000500.[/b] (with the period). I dont know how to supress this zero and period. :( . if any body know how to resolve it.
From source(teradata) I am extracting a decimal coln with datatype decimal(6) and putting it in to a text file with datatype(decimal(6)).My problem is ,for source value 500 i am getting output as [b]000500.[/b] (with the period). I dont know how to supress this zero and period. :( . if any body know how to resolve it.
Regards,
Kithu
Kithu
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 12
- Joined: Tue Aug 26, 2008 11:05 pm
- Contact:
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
-
- Participant
- Posts: 12
- Joined: Tue Aug 26, 2008 11:05 pm
- Contact:
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 12
- Joined: Tue Aug 26, 2008 11:05 pm
- Contact:
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 12
- Joined: Tue Aug 26, 2008 11:05 pm
- Contact:
-
- Participant
- Posts: 12
- Joined: Tue Aug 26, 2008 11:05 pm
- Contact:
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
The decimal field will always have zero padded in front of the actual value to make it to defined length. You can't do anything with that. Changing it to VarChar(6) will not impact the other jobs reading this field as decimal(6) as the sequential file doesn't store the metadata and the value present in that field id numeric.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.![Wink :wink:](./images/smilies/icon_wink.gif)
Genius may have its limitations, but stupidity is not thus handicapped.
![Wink :wink:](./images/smilies/icon_wink.gif)
-
- Participant
- Posts: 12
- Joined: Tue Aug 26, 2008 11:05 pm
- Contact: