how to create fixed width text file
Posted: Mon Aug 08, 2011 3:09 pm
Hi ,
I need to create fixed width text file in the target. From source im getting csv file. From source data is in varchar and in target they are in char type. I want to have fixed width file in the target directory. If the length is 10 and data is of length 5 then it should add 5 zero's or add space to make it length 10. For numeric type when I have applied the logic it is working out ie....changing the target sql type to char. But it im not seeing this true for char type. Can anyone please tell me how to achieve this ?
Example: target lenth 10
Source : "1234"
Target : " 0000001234"
I need to create fixed width text file in the target. From source im getting csv file. From source data is in varchar and in target they are in char type. I want to have fixed width file in the target directory. If the length is 10 and data is of length 5 then it should add 5 zero's or add space to make it length 10. For numeric type when I have applied the logic it is working out ie....changing the target sql type to char. But it im not seeing this true for char type. Can anyone please tell me how to achieve this ?
Example: target lenth 10
Source : "1234"
Target : " 0000001234"