Friday, November 04, 2005

New Office Location

Monroe office

I got to the office around 9 am. The boxes were already in my new cube. It took me 45 minutes to unpack all my boxes. I worked on a work order that needed to update a field on an oracle table.

Here are the steps I did to accomplish the job.

  1. imported the text file which was delimited by ‘|’ to a spreadsheet.
  2. imported the spreadsheet to access database
  3. exported the access table to an oracle table using odbc
  4. created a pl/sql program to update the target table using the new table.

pl/sql program:

declare
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;

The whole process took 30 minutes.

No comments: