Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Query

942199Jun 14 2012 — edited Jun 14 2012
Hi all,

I need Stored procedure to update value of 1 column from external table to DB table.
DB table:
create table ex_emp(emp_id number(5),employee_name varchar2(20),address varchar2(20));

Here
emp_id is Primary key..
The values are inserted through external table.
External table
create table ext_ex_emp(emp_id number(5),employee_name varchar2(20),address varchar2(20),code varchar2(5))
Now recently code column is added ..I want to add column code in ex_emp and created it
alter table ex_emp add code varchar2(5)
I need store procedure to update ex_emp where code must be in 3 byte..for example If it is '4A','5' then I want to update row as '0004A' ,'00005'like wise.add 0 in front to form data to 5 bytes and add to ex_emp table.
This post has been answered by 00125 on Jun 14 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 12 2012
Added on Jun 14 2012
11 comments
114 views