Hi,
I have a source file which is fixed width and i am using substring function to fecth the value i.e testcolumn[25,2] and the value in source column (varchar) is '03' and the target is integer(2) field.
In between, the source and target i am using a transfomer stage for transfomations on other columns,but the testcolumn is an direct load
when i load the data to the target dataset, the value been loaded is 3, instead the target should be 03.
The zeros are been truncated before i laod to the target, which should not be the case here.
Can anyone please help me on this.
Regards,
Aditya
zero not to be truncated
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 104
- Joined: Thu Jul 12, 2007 11:32 pm
- Location: Canada
-
- Participant
- Posts: 57
- Joined: Wed Oct 21, 2009 4:46 am
- Location: India
-
- Premium Member
- Posts: 104
- Joined: Thu Jul 12, 2007 11:32 pm
- Location: Canada
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
'03' is only a displaytype for integers. You can do something like
Code: Select all
SELECT to_char(yourIntField, '00')
FROM yourTable
Sorry, but it doesn't really matter that is what you 'want', leading zeroes are not stored in any kind of numeric field. As noted, however, you can make it look the way you want when you extract it with the proper TO_CHAR() conversion and format mask.adityavarma wrote:The target is oracle table and the datatype is integer, so in the target i want the value to be 03
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: