I'm totally new to the Oracle world and I need help writing the following prodecure:
Create a database prodecure to delete the data from the table (modmast) in the ORADBA schema and refresh it from the external table plmprd.modmast in Production.
create procedure MOD_UPDATE
as
begin
truncate table oradba.modmast;
insert into oradba.modmast (MBSEG,CO,PLANT,MODEL,WIDTH,LNGTH,HLNGTH,PRLIN#,MDLEDT,BEGCAT,ENDCAT,BASEPR,BASECS,FLRNUM,MODES,MODP RE,MODSUF,WOMOD,AUTUPD,LSTUPD,BOMNAM,UPDDT8,AUDDT8,CRAP,FASTNR,MSPRF1,MSPRF2,MSPRF3) values (select * from plmprod.modmast);
end
/
create or replace procedure MOD_UPDATE
as
begin
execute immediate 'truncate table oradba.modmast';
execute immediate 'create table oradba.modmast as (select * from plmprod.modmast);
end
/
execute immediate 'create table oradba.modmast as (select * from plmprod.modmast);
This should be an insert statement rather than a create statement. You already have the table as davey has mentioned above, why do you want to create it again ?
Amar "There is a difference between knowing the path and walking the path."
Bookmarks