I got to the office around
Here are the steps I did to accomplish the job.
- imported the text file which was delimited by ‘|’ to a spreadsheet.
- imported the spreadsheet to access database
- exported the access table to an oracle table using odbc
- created a pl/sql program to update the target table using the new table.
pl/sql program:
v_adean char(13);
v_addc char(1);
v_adcsl number(5,2);
cursor adcsl_cur is select adean,addc,to_number(adcsl) from aditemf_adcsl;
begin
open adcsl_cur;
loop
fetch adcsl_cur into v_adean,v_addc,v_adcsl;
EXIT WHEN adcsl_cur%NOTFOUND;
update aditemf set adcsl = v_adcsl
where adean = v_adean and addc = v_addc;
commit;
end loop
commit;
close adcsl_cur;
end;
No comments:
Post a Comment