on 06-24-2010 1:05 PM
I am loading data from a flat file to a DSO.
One of the columns in the flat file is data type CHAR with a length of two. The data values will be either 01, 02 or 03.
When I load the data, the leading zeroes are dropped. Thus, I see 1, 2 and 3 in my DSO. How can I prevent this happening?
You can either change the number format to text format in the excel sheet and then try to load the data.
Or concatenate the value 0 to the field value in transformation (update rule/transfer rule) using a routine. Then load the data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create an InfoObject zyourfield and add it to your DSO.
Then create a fieldroutine in the transformation / update rule:
data: zyourfield type /bic/oizyourfield.
if source_fields-zyourfield ne ''.
write source_fields-zyourfield +6(2) to h_zyourfield right-justified.
overlay h_zyourfield with '00'.
result = h_zyourfield .
endif.
This should do the trick, good luck!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Right Click on that column in Excel file and Formate Cells >Custome> Under Type give "00" and then give the values in column like 01 , 02 .... and save as .csv and close it, immediatly load it, DON"T OPEN FILE, because , if you open it will reset to 1, 2... SO again you need to Right click.....and formare cells..
Thanks
Reddy
Edited by: Surendra Reddy on Jun 24, 2010 4:28 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.