- 浏览: 2936 次
- 性别:
- 来自: 深圳
文章分类
最新评论
CREATE OR REPLACE Package Body Pkg_Extract_Base Is
Procedure p_Load_Exp5_Base Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
--TM_EMPLOYEE variable define
type ref_emp is ref cursor;
c_emp ref_emp;
type rec is table of exp5.tm_employee%rowtype;
recs rec;
v_interval number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 17;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 30;
v_Log := 'Tm_Bar_Opt_Code';
Execute Immediate 'Truncate Table Tmp_Bar_Opt_Code';
Insert Into Tmp_Bar_Opt_Code
Select * From Exp5.Tm_Bar_Opt_Code;
Commit;
v_Line_No := 41;
--Execute Immediate 'Truncate Table Exp5.Tm_Bar_Opt_Code';
Delete From Exp5.Tm_Bar_Opt_Code;
Insert Into Exp5.Tm_Bar_Opt_Code
(Op_Code,
Op_Name,
Op_Code_Id,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Op_Name_En,
Op_Name_Short)
Select Op_Code,
Op_Name,
Op_Code_Id,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Op_Name_En,
Op_Name_Short
From Exp5.Tm_Bar_Opt_Code@Link_Asura;
Commit;
v_Line_No := 69;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Bar_Opt_Code
Where Rownum = 1;
If v_Cnt < 1 Then
Insert Into Exp5.Tm_Bar_Opt_Code
Select * From Tmp_Bar_Opt_Code;
Commit;
v_Line_No := 77;
v_Log := 'Tm_Bar_Opt_Code 无数据';
Raise Row_Excep;
End If;
v_Line_No := 85;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 113;
v_Log := 'Tm_Bar_Stay_Why_Code';
Execute Immediate 'Truncate Table Tmp_Bar_Stay_Why_Code';
Insert Into Tmp_Bar_Stay_Why_Code
Select * From Exp5.Tm_Bar_Stay_Why_Code;
Commit;
v_Line_No := 121;
--Execute Immediate 'Truncate Table Exp5.Tm_Bar_Stay_Why_Code';
Delete From Exp5.Tm_Bar_Stay_Why_Code;
Insert Into Exp5.Tm_Bar_Stay_Why_Code
(Stay_Why_Code,
Stay_Why_Name,
Bill_Stay_Why_Id,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Stay_Why_Name_En)
Select Stay_Why_Code,
Stay_Why_Name,
Bill_Stay_Why_Id,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Stay_Why_Name_En
From Exp5.Tm_Bar_Stay_Why_Code@Link_Asura;
Commit;
v_Line_No := 148;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Bar_Stay_Why_Code
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 155;
Insert Into Exp5.Tm_Bar_Stay_Why_Code
Select * From Tmp_Bar_Stay_Why_Code;
Commit;
v_Line_No := 160;
v_Log := 'Tm_Bar_Stay_Why_Code 无记录';
Raise Row_Excep;
End If;
v_Line_No := 165;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 196;
v_Log := 'Tm_Bar_Stay_Why_Code_I18n';
Execute Immediate 'Truncate Table Tmp_Bar_Stay_Why_Code_I18n';
Insert Into Tmp_Bar_Stay_Why_Code_I18n
Select * From Exp5.Tm_Bar_Stay_Why_Code_I18n;
Commit;
v_Line_No := 204;
--Execute Immediate 'Truncate Table Exp5.Tm_Bar_Stay_Why_Code_I18n';
Delete From Exp5.Tm_Bar_Stay_Why_Code_I18n;
Insert Into Exp5.Tm_Bar_Stay_Why_Code_I18n
(Id,
Tab_Id,
Stay_Why_Name,
Valid_Flg,
Language_I18n,
Country_I18n,
Variant_I18n,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm)
Select Id,
Tab_Id,
Stay_Why_Name,
Valid_Flg,
Language_I18n,
Country_I18n,
Variant_I18n,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm
From Exp5.Tm_Bar_Stay_Why_Code_I18n@Link_Asura;
Commit;
v_Line_No := 236;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Bar_Stay_Why_Code_I18n
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 243;
Insert Into Exp5.Tm_Bar_Stay_Why_Code_I18n
Select * From Tmp_Bar_Stay_Why_Code_I18n;
Commit;
v_Line_No := 248;
v_Log := 'Tm_Bar_Stay_Why_Code_I18n 无记录';
Raise Row_Excep;
End If;
v_Line_No := 256;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 284;
v_Log := 'TM_EMPLOYEE';
v_interval:= 20000;
Execute Immediate 'Truncate Table TMP_EMPLOYEE';
open c_emp for select * from Exp5.TM_EMPLOYEE;
while TRUE
loop
fetch c_emp bulk collect into recs limit v_interval;
forall i in 1 .. recs.count
insert into TMP_EMPLOYEE values recs(i);
commit;
exit when c_emp%notfound;
end loop;
close c_emp;
v_Line_No := 292;
--pull data from asura DB
Execute Immediate 'Truncate Table Exp5.TM_EMPLOYEE';
open c_emp for select * from Exp5.TM_EMPLOYEE@Link_Asura;
while TRUE
loop
fetch c_emp bulk collect into recs limit v_interval;
forall i in 1 .. recs.count
insert into Exp5.TM_EMPLOYEE values recs(i);
commit;
exit when c_emp%notfound;
end loop;
close c_emp;
v_Line_No := 343;
Select Count(1) Into v_Cnt From Exp5.TM_EMPLOYEE Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 347;
--rollback from tmp table
open c_emp for select * from TMP_EMPLOYEE;
while TRUE
loop
fetch c_emp bulk collect into recs limit v_interval;
forall i in 1 .. recs.count
insert into Exp5.TM_EMPLOYEE values recs(i);
commit;
exit when c_emp%notfound;
end loop;
close c_emp;
v_Line_No := 352;
v_Log := 'TM_EMPLOYEE 无记录';
Raise Row_Excep;
End If;
v_Line_No := 357;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 387;
v_Log := 'Tm_Cargo_Type';
Execute Immediate 'Truncate Table Tmp_Cargo_Type';
Insert Into Tmp_Cargo_Type
Select * From Exp5.Tm_Cargo_Type;
Commit;
v_Line_No := 395;
--Execute Immediate 'Truncate Table Exp5.Tm_Cargo_Type';
Delete From Exp5.Tm_Cargo_Type;
Insert Into Exp5.Tm_Cargo_Type
(Type_Id,
Parent_Id,
Type_Name,
Type_Code,
Type_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Type_Name_En)
Select Type_Id,
Parent_Id,
Type_Name,
Type_Code,
Type_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Type_Name_En
From Exp5.Tm_Cargo_Type@Link_Asura;
Commit;
v_Line_No := 427;
Select Count(1) Into v_Cnt From Exp5.Tm_Cargo_Type Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 431;
Insert Into Exp5.Tm_Cargo_Type
Select * From Tmp_Cargo_Type;
Commit;
v_Line_No := 436;
v_Log := 'Tm_Cargo_Type 无记录';
Raise Row_Excep;
End If;
v_Line_No := 441;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 472;
v_Log := 'Tm_Currency';
Execute Immediate 'Truncate Table Tmp_Currency';
Insert Into Tmp_Currency
Select * From Exp5.Tm_Currency;
Commit;
v_Line_No := 480;
--Execute Immediate 'Truncate Table Exp5.Tm_Currency';
Delete From Exp5.Tm_Currency;
Insert Into Exp5.Tm_Currency
(Currency_Id,
Currency_Name,
Currency_Code,
Standard_Code,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Price_Round_Type,
Number_Param)
Select Currency_Id,
Currency_Name,
Currency_Code,
Standard_Code,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Price_Round_Type,
Number_Param
From Exp5.Tm_Currency@Link_Asura;
Commit;
v_Line_No := 512;
Select Count(1) Into v_Cnt From Exp5.Tm_Currency Where Rownum = 1;
If v_Cnt < 1 Then
Insert Into Exp5.Tm_Currency
Select * From Tmp_Currency;
Commit;
v_Line_No := 520;
v_Log := 'Tm_Currency 无记录';
Raise Row_Excep;
End If;
v_Line_No := 525;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 556;
v_Log := 'Tm_Datacenter';
Execute Immediate 'Truncate Table Tmp_Datacenter';
Insert Into Tmp_Datacenter
Select * From Exp5.Tm_Datacenter;
Commit;
v_Line_No := 564;
--Execute Immediate 'Truncate Table Exp5.Tm_Datacenter';
Delete From Exp5.Tm_Datacenter;
Insert Into Exp5.Tm_Datacenter
(Datacenter_Id,
Datacenter_Code,
Datacenter_Name,
Datacenter_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Db_Name)
Select Datacenter_Id,
Datacenter_Code,
Datacenter_Name,
Datacenter_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Db_Name
From Exp5.Tm_Datacenter@Link_Asura;
Commit;
v_Line_No := 593;
Select Count(1) Into v_Cnt From Exp5.Tm_Datacenter Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 597;
Insert Into Exp5.Tm_Datacenter
Select * From Tmp_Datacenter;
Commit;
v_Line_No := 602;
v_Log := 'Tm_Datacenter 无记录';
Raise Row_Excep;
End If;
v_Line_No := 607;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 638;
v_Log := 'Tm_Datacenter_Zone';
Execute Immediate 'Truncate Table Tmp_Datacenter_Zone';
Insert Into Tmp_Datacenter_Zone
Select * From Exp5.Tm_Datacenter_Zone;
Commit;
v_Line_No := 646;
--Execute Immediate 'Truncate Table Exp5.Tm_Datacenter_Zone';
Delete From Exp5.Tm_Datacenter_Zone;
Insert Into Exp5.Tm_Datacenter_Zone
(Datacenter_Zone_Id,
Zone_Code,
Datacenter_Code,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm)
Select Datacenter_Zone_Id,
Zone_Code,
Datacenter_Code,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm
From Exp5.Tm_Datacenter_Zone@Link_Asura;
Commit;
v_Line_No := 670;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Datacenter_Zone
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 677;
Insert Into Exp5.Tm_Datacenter_Zone
Select * From Tmp_Datacenter_Zone;
Commit;
v_Line_No := 682;
v_Log := 'Tm_Datacenter_Zone 无记录';
Raise Row_Excep;
End If;
v_Line_No := 687;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 718;
v_Log := 'Tm_Department';
Execute Immediate 'Truncate Table Tmp_Department';
Insert Into Tmp_Department
Select * From Exp5.Tm_Department;
Commit;
v_Line_No := 726;
--Execute Immediate 'Truncate Table Exp5.Tm_Department';
Delete From Exp5.Tm_Department;
Insert Into Exp5.Tm_Department
(Dept_Id,
Division_Code,
Area_Code,
Hq_Code,
Type_Code,
Dept_Name,
Dept_Code,
Dept_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Dt,
Currency_Code,
Dist_Code,
Phone_No,
Fax_No,
Contactor_Name,
Delete_Flg,
Invalid_Tm,
Server_Flg,
Parent_Dept_Code,
Type_Level,
Account_Code,
Outside_Name,
Deldate,
City_Code,
Dept_Addr,
Postal_Code,
Outside_Name_En,
Email_Addr,
Belong_County,
Belong_Village,
Dept_Gmt,
Shop_Code)
Select Dept_Id,
Division_Code,
Area_Code,
Hq_Code,
Type_Code,
Dept_Name,
Dept_Code,
Dept_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Dt,
Currency_Code,
Dist_Code,
Phone_No,
Fax_No,
Contactor_Name,
Delete_Flg,
Invalid_Tm,
Server_Flg,
Parent_Dept_Code,
Type_Level,
Account_Code,
Outside_Name,
Deldate,
City_Code,
Dept_Addr,
Postal_Code,
Outside_Name_En,
Email_Addr,
Belong_County,
Belong_Village,
Dept_Gmt,
Shop_Code
From Exp5.Tm_Department@Link_Asura;
Commit;
v_Line_No := 806;
Select Count(1) Into v_Cnt From Exp5.Tm_Department Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 810;
Insert Into Exp5.Tm_Department
Select * From Tmp_Department;
Commit;
v_Line_No := 815;
v_Log := 'Tm_Department 无记录';
Raise Row_Excep;
End If;
v_Line_No := 820;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 851;
v_Log := 'Tm_Department_I18n';
Execute Immediate 'Truncate Table Tmp_Department_I18n';
Insert Into Tmp_Department_I18n
Select * From Exp5.Tm_Department_I18n;
Commit;
v_Line_No := 859;
--Execute Immediate 'Truncate Table Exp5.Tm_Department_I18n';
Delete From Exp5.Tm_Department_I18n;
Insert Into Exp5.Tm_Department_I18n
(Id,
Tab_Id,
Dept_Name,
Dept_Desc,
Outside_Name,
Contactor_Name,
Belong_County,
Belong_Village,
Valid_Flg,
Language_I18n,
Country_I18n,
Variant_I18n,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm)
Select Id,
Tab_Id,
Dept_Name,
Dept_Desc,
Outside_Name,
Contactor_Name,
Belong_County,
Belong_Village,
Valid_Flg,
Language_I18n,
Country_I18n,
Variant_I18n,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm
From Exp5.Tm_Department_I18n@Link_Asura;
Commit;
v_Line_No := 901;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Department_I18n
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 908;
Insert Into Exp5.Tm_Department_I18n
Select * From Tmp_Department_I18n;
Commit;
v_Line_No := 913;
v_Log := 'Tm_Department_I18n 无记录';
Raise Row_Excep;
End If;
v_Line_No := 918;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 949;
v_Log := 'Tm_Distance_Type';
Execute Immediate 'Truncate Table Tmp_Distance_Type';
Insert Into Tmp_Distance_Type
Select * From Exp5.Tm_Distance_Type;
Commit;
v_Line_No := 957;
--Execute Immediate 'Truncate Table Exp5.Tm_Distance_Type';
Delete From Exp5.Tm_Distance_Type;
Insert Into Exp5.Tm_Distance_Type
(Type_Id,
Type_Name,
Type_Code,
Type_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Parent_Id,
Valid_Flg,
Type_Name_En)
Select Type_Id,
Type_Name,
Type_Code,
Type_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Parent_Id,
Valid_Flg,
Type_Name_En
From Exp5.Tm_Distance_Type@Link_Asura;
Commit;
v_Line_No := 989;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Distance_Type
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 996;
Insert Into Exp5.Tm_Distance_Type
Select * From Tmp_Distance_Type;
Commit;
v_Line_No := 1001;
v_Log := 'Tm_Distance_Type 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1006;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1037;
v_Log := 'Tm_District';
Execute Immediate 'Truncate Table Tmp_District';
Insert Into Tmp_District
Select * From Exp5.Tm_District;
Commit;
v_Line_No := 1045;
--Execute Immediate 'Truncate Table Exp5.Tm_District';
Delete From Exp5.Tm_District;
Insert Into Exp5.Tm_District
(Dist_Id,
County_Code,
City_Code,
Province_Code,
Country_Code,
Type_Code,
Dist_Name,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Dist_Code,
Parent_Dist_Code,
Currency_Code,
Valid_Flg,
Weight_Unit)
Select Dist_Id,
County_Code,
City_Code,
Province_Code,
Country_Code,
Type_Code,
Dist_Name,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Dist_Code,
Parent_Dist_Code,
Currency_Code,
Valid_Flg,
Weight_Unit
From Exp5.Tm_District@Link_Asura;
Commit;
v_Line_No := 1087;
Select Count(1) Into v_Cnt From Exp5.Tm_District Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1091;
Insert Into Exp5.Tm_District
Select * From Tmp_District;
Commit;
v_Line_No := 1096;
v_Log := 'Tm_District 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1101;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1132;
v_Log := 'Tm_District_I18n';
Execute Immediate 'Truncate Table Tmp_District_I18n';
Insert Into Tmp_District_I18n
Select * From Exp5.Tm_District_I18n;
Commit;
v_Line_No := 1140;
--Execute Immediate 'Truncate Table Exp5.Tm_District_I18n';
Delete From Exp5.Tm_District_I18n;
Insert Into Exp5.Tm_District_I18n
(Id,
Tab_Id,
Dist_Name,
Valid_Flg,
Language_I18n,
Country_I18n,
Variant_I18n,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm)
Select Id,
Tab_Id,
Dist_Name,
Valid_Flg,
Language_I18n,
Country_I18n,
Variant_I18n,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm
From Exp5.Tm_District_I18n@Link_Asura;
Commit;
v_Line_No := 1171;
Select Count(1)
Into v_Cnt
From Exp5.Tm_District_I18n
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1178;
Insert Into Exp5.Tm_District_I18n
Select * From Tmp_District_I18n;
Commit;
v_Line_No := 1183;
v_Log := 'Tm_District_I18n 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1188;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1219;
v_Log := 'Tm_Express_Type';
Execute Immediate 'Truncate Table Tmp_Express_Type';
Insert Into Tmp_Express_Type
Select * From Exp5.Tm_Express_Type;
Commit;
v_Line_No := 1227;
--Execute Immediate 'Truncate Table Exp5.Tm_Express_Type';
Delete From Exp5.Tm_Express_Type;
Insert Into Exp5.Tm_Express_Type
(Type_Id,
Type_Name,
Type_Code,
Type_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Type_Name_En)
Select Type_Id,
Type_Name,
Type_Code,
Type_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Type_Name_En
From Exp5.Tm_Express_Type@Link_Asura;
Commit;
v_Line_No := 1257;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Express_Type
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1264;
Insert Into Exp5.Tm_Express_Type
Select * From Tmp_Express_Type;
Commit;
v_Line_No := 1269;
v_Log := 'Tm_Express_Type 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1274;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1305;
v_Log := 'Tm_House_Express_Tm';
Execute Immediate 'Truncate Table Tmp_House_Express_Tm';
Insert Into Tmp_House_Express_Tm
Select * From Exp5.Tm_House_Express_Tm;
Commit;
v_Line_No := 1313;
--Execute Immediate 'Truncate Table Exp5.Tm_House_Express_Tm';
Delete From Exp5.Tm_House_Express_Tm;
Insert Into Exp5.Tm_House_Express_Tm
(Id,
No,
Dept_Code,
Out_Tm_Begin,
Out_Tm_End,
Send_Tm_Begin,
Send_Tm_End)
Select Id,
No,
Dept_Code,
Out_Tm_Begin,
Out_Tm_End,
Send_Tm_Begin,
Send_Tm_End
From Exp5.Tm_House_Express_Tm@Link_Asura;
Commit;
v_Line_No := 1337;
Select Count(1)
Into v_Cnt
From Exp5.Tm_House_Express_Tm
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1344;
Insert Into Exp5.Tm_House_Express_Tm
Select * From Tmp_House_Express_Tm;
Commit;
v_Line_No := 1349;
v_Log := 'Tm_House_Express_Tm 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1354;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1385;
v_Log := 'Tm_Limit_Type';
Execute Immediate 'Truncate Table Tmp_Limit_Type';
Insert Into Tmp_Limit_Type
Select * From Exp5.Tm_Limit_Type;
Commit;
v_Line_No := 1393;
--Execute Immediate 'Truncate Table Exp5.Tm_Limit_Type';
Delete From Exp5.Tm_Limit_Type;
Insert Into Exp5.Tm_Limit_Type
(Type_Id,
Parent_Id,
Type_Name,
Type_Code,
Type_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Type_Name_En)
Select Type_Id,
Parent_Id,
Type_Name,
Type_Code,
Type_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Type_Name_En
From Exp5.Tm_Limit_Type@Link_Asura;
Commit;
v_Line_No := 1425;
Select Count(1) Into v_Cnt From Exp5.Tm_Limit_Type Where Rownum = 1;
If v_Cnt < 1 Then
Insert Into Exp5.Tm_Limit_Type
Select * From Tmp_Limit_Type;
Commit;
v_Line_No := 1433;
v_Log := 'Tm_Limit_Type 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1438;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1469;
v_Log := 'Tm_Line';
Execute Immediate 'Truncate Table Tmp_Line';
Insert Into Tmp_Line
Select * From Exp5.Tm_Line;
Commit;
v_Line_No := 1477;
--Execute Immediate 'Truncate Table Exp5.Tm_Line';
Delete From Exp5.Tm_Line;
Insert Into Exp5.Tm_Line
(Line_Id,
Line_Code,
Line_Name,
Src_Zone_Code,
Dest_Zone_Code,
Line_Distance,
Conduct_Way_Flg,
Line_Start_Tm,
Line_End_Tm,
Version_No,
Version_Qty,
Deleted_Flg,
Line_Desc,
Line_Level_Code,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Line_Transport_Code,
Days_Qty,
Src_Transfer_Code,
Dest_Transfer_Code,
Financing_Attr,
Valid_Dt)
Select Line_Id,
Line_Code,
Line_Name,
Src_Zone_Code,
Dest_Zone_Code,
Line_Distance,
Conduct_Way_Flg,
Line_Start_Tm,
Line_End_Tm,
Version_No,
Version_Qty,
Deleted_Flg,
Line_Desc,
Line_Level_Code,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Line_Transport_Code,
Days_Qty,
Src_Transfer_Code,
Dest_Transfer_Code,
Financing_Attr,
Valid_Dt
From Exp5.Tm_Line@Link_Asura where Line_Code is not null;
Commit;
v_Line_No := 1535;
Select Count(1) Into v_Cnt From Exp5.Tm_Line Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1539;
Insert Into Exp5.Tm_Line
Select * From Tmp_Line;
Commit;
v_Line_No := 1544;
v_Log := 'Tm_Line 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1549;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1580;
v_Log := 'Tm_Local_Datacenter';
Execute Immediate 'Truncate Table Tmp_Local_Datacenter';
Insert Into Tmp_Local_Datacenter
Select * From Exp5.Tm_Local_Datacenter;
Commit;
v_Line_No := 1588;
--Execute Immediate 'Truncate Table Exp5.Tm_Local_Datacenter';
Delete From Exp5.Tm_Local_Datacenter;
Insert Into Exp5.Tm_Local_Datacenter
(Local_Datacenter_Code, Datacenter_Name, Local_Db_Name)
Select Local_Datacenter_Code, Datacenter_Name, Local_Db_Name
From Exp5.Tm_Local_Datacenter@Link_Asura;
Commit;
v_Line_No := 1600;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Local_Datacenter
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1607;
Insert Into Exp5.Tm_Local_Datacenter
Select * From Tmp_Local_Datacenter;
Commit;
v_Line_No := 1612;
v_Log := 'Tm_Local_Datacenter 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1617;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1648;
v_Log := 'Tm_Maintain_Info';
Execute Immediate 'Truncate Table Tmp_Maintain_Info';
Insert Into Tmp_Maintain_Info
Select * From Exp5.Tm_Maintain_Info;
Commit;
v_Line_No := 1656;
--Execute Immediate 'Truncate Table Exp5.Tm_Maintain_Info';
Delete From Exp5.Tm_Maintain_Info;
Insert Into Exp5.Tm_Maintain_Info
(Info_Id,
Inform_Cont,
Invaid_Tm,
Valid_Flag,
Inform_Title,
Sign_Info,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Inform_Name)
Select Info_Id,
Inform_Cont,
Invaid_Tm,
Valid_Flag,
Inform_Title,
Sign_Info,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Inform_Name
From Exp5.Tm_Maintain_Info@Link_Asura;
Commit;
v_Line_No := 1688;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Maintain_Info
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1695;
Insert Into Exp5.Tm_Maintain_Info
Select * From Tmp_Maintain_Info;
Commit;
v_Line_No := 1700;
v_Log := 'Tm_Maintain_Info 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1705;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1736;
v_Log := 'Tm_Service_Prod';
Execute Immediate 'Truncate Table Tmp_Service_Prod';
Insert Into Tmp_Service_Prod
Select * From Exp5.Tm_Service_Prod;
Commit;
v_Line_No := 1744;
--Execute Immediate 'Truncate Table Exp5.Tm_Service_Prod';
Delete From Exp5.Tm_Service_Prod;
Insert Into Exp5.Tm_Service_Prod
(Service_Prod_Id,
Service_Name,
Service_Code,
Service_Attr1,
Service_Attr2,
Service_Attr3,
Service_Attr4,
Service_Attr5,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm)
Select Service_Prod_Id,
Service_Name,
Service_Code,
Service_Attr1,
Service_Attr2,
Service_Attr3,
Service_Attr4,
Service_Attr5,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm
From Exp5.Tm_Service_Prod@Link_Asura;
Commit;
v_Line_No := 1778;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Service_Prod
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1914;
Insert Into Exp5.Tm_Service_Prod
Select * From Tmp_Service_Prod;
Commit;
v_Line_No := 1790;
v_Log := 'Tm_Service_Prod 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1795;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1826;
v_Log := 'Tm_Store';
Execute Immediate 'Truncate Table Tmp_Store';
Insert Into Tmp_Store
Select * From Exp5.Tm_Store;
Commit;
v_Line_No := 1834;
--Execute Immediate 'Truncate Table Exp5.Tm_Store';
Delete From Exp5.Tm_Store;
Insert Into Exp5.Tm_Store
(Store_Id,
Store_Code,
Store_Name,
Store_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Extendattach1,
Extendattach2)
Select Store_Id,
Store_Code,
Store_Name,
Store_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Extendattach1,
Extendattach2
From Exp5.Tm_Store@Link_Asura;
Commit;
v_Line_No := 1866;
Select Count(1) Into v_Cnt From Exp5.Tm_Store Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1870;
Insert Into Exp5.Tm_Store
Select * From Tmp_Store;
Commit;
v_Line_No := 1875;
v_Log := 'Tm_Store 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1880;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1911;
v_Log := 'Tm_Transport_Type';
Execute Immediate 'Truncate Table Tmp_Transport_Type';
Insert Into Tmp_Transport_Type
Select * From Exp5.Tm_Transport_Type;
Commit;
v_Line_No := 1919;
--Execute Immediate 'Truncate Table Exp5.Tm_Transport_Type';
Delete From Exp5.Tm_Transport_Type;
Insert Into Exp5.Tm_Transport_Type
(Type_Id,
Type_Name,
Type_Desc,
Type_Code,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Type_Name_En)
Select Type_Id,
Type_Name,
Type_Desc,
Type_Code,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Type_Name_En
From Exp5.Tm_Transport_Type@Link_Asura;
Commit;
v_Line_No := 1949;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Transport_Type
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1956;
Insert Into Exp5.Tm_Transport_Type
Select * From Tmp_Transport_Type;
Commit;
v_Line_No := 1961;
v_Log := 'Tm_Transport_Type 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1966;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1997;
v_Log := 'Ts_Accredit_Dept';
Execute Immediate 'Truncate Table Tmp_Accredit_Dept';
Insert Into wqs.Tmp_Accredit_Dept
Select * From Exp5.Ts_Accredit_Dept;
Commit;
v_Line_No := 2005;
--Execute Immediate 'Truncate Table Exp5.Ts_Accredit_Dept';
Delete From Exp5.Ts_Accredit_Dept;
Insert Into Exp5.Ts_Accredit_Dept
(User_Id, Dept_Id)
Select User_Id, Dept_Id From Exp5.Ts_Accredit_Dept@Link_Asura;
Commit;
v_Line_No := 2017;
Select Count(1)
Into v_Cnt
From Exp5.Ts_Accredit_Dept
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2024;
Insert Into Exp5.Ts_Accredit_Dept
Select * From Tmp_Accredit_Dept;
Commit;
v_Line_No := 2029;
v_Log := 'Ts_Accredit_Dept 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2034;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2065;
v_Log := 'Ts_Accredit_Role';
Execute Immediate 'Truncate Table Tmp_Accredit_Role';
Insert Into Tmp_Accredit_Role
Select * From Exp5.Ts_Accredit_Role;
Commit;
v_Line_No := 2073;
--Execute Immediate 'Truncate Table Exp5.Ts_Accredit_Role';
Delete From Exp5.Ts_Accredit_Role;
Insert Into Exp5.Ts_Accredit_Role
(User_Id, Role_Id)
Select User_Id, Role_Id From Exp5.Ts_Accredit_Role@Link_Asura;
Commit;
v_Line_No := 2084;
Select Count(1)
Into v_Cnt
From Exp5.Ts_Accredit_Role
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2091;
Insert Into Exp5.Ts_Accredit_Role
Select * From Tmp_Accredit_Role;
Commit;
v_Line_No := 2096;
v_Log := 'Ts_Accredit_Role 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2101;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2132;
v_Log := 'Ts_Accredit_User';
Execute Immediate 'Truncate Table Tmp_Accredit_User';
Insert Into Tmp_Accredit_User
Select * From Exp5.Ts_Accredit_User;
Commit;
v_Line_No := 2140;
--Execute Immediate 'Truncate Table Exp5.Ts_Accredit_User';
Delete From Exp5.Ts_Accredit_User;
Insert Into Exp5.Ts_Accredit_User
(Accredit_Id, Operater_Id, Operate_Tm, User_Id, Used_Tm, Type_Code)
Select Accredit_Id,
Operater_Id,
Operate_Tm,
User_Id,
Used_Tm,
Type_Code
From Exp5.Ts_Accredit_User@Link_Asura;
Commit;
v_Line_No := 2157;
Select Count(1)
Into v_Cnt
From Exp5.Ts_Accredit_User
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2164;
Insert Into Exp5.Ts_Accredit_User
Select * From Tmp_Accredit_User;
Commit;
v_Line_No := 2169;
v_Log := 'Ts_Accredit_User 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2174;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2205;
v_Log := 'Ts_Module';
Execute Immediate 'Truncate Table Tmp_Module';
Insert Into Tmp_Module
Select * From Exp5.Ts_Module;
Commit;
v_Line_No := 2213;
--Execute Immediate 'Truncate Table Exp5.Ts_Module';
Delete From Exp5.Ts_Module;
Insert Into Exp5.Ts_Module
(Module_Id,
Parent_Id,
Module_Name,
Module_Code,
Module_Desc,
Module_Icon,
Module_Type,
App_Type,
Action_Url,
Sort,
Bundle_Id,
Help_Url)
Select Module_Id,
Parent_Id,
Module_Name,
Module_Code,
Module_Desc,
Module_Icon,
Module_Type,
App_Type,
Action_Url,
Sort,
Bundle_Id,
Help_Url
From Exp5.Ts_Module@Link_Asura;
Commit;
v_Line_No := 2247;
Select Count(1) Into v_Cnt From Exp5.Ts_Module Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2251;
Insert Into Exp5.Ts_Module
Select * From Tmp_Module;
Commit;
v_Line_No := 2256;
v_Log := 'Ts_Module 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2261;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2293;
v_Log := 'Ts_Role';
Execute Immediate 'Truncate Table Tmp_Role';
Insert Into Tmp_Role
Select * From Exp5.Ts_Role;
Commit;
v_Line_No := 2301;
--Execute Immediate 'Truncate Table Exp5.Ts_Role';
Delete From Exp5.Ts_Role;
Insert Into Exp5.Ts_Role
(role_id,
role_name,
role_desc,
used_tm,
unused_tm,
role_type_code,
sys_init_flg,
emp_duty,
create_emp,
create_tm,
update_emp,
update_tm)
Select role_id,
role_name,
role_desc,
used_tm,
unused_tm,
role_type_code,
sys_init_flg,
emp_duty,
create_emp,
create_tm,
update_emp,
update_tm
From Exp5.Ts_Role@Link_Asura;
Commit;
v_Line_No := 2334;
Select Count(1) Into v_Cnt From Exp5.Ts_Role Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2338;
Insert Into Exp5.Ts_Role
Select * From Tmp_Role;
Commit;
v_Line_No := 2343;
v_Log := 'Ts_Role 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2348;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2379;
v_Log := 'Ts_Role_Module';
Execute Immediate 'Truncate Table Tmp_Role_Module';
Insert Into Tmp_Role_Module
Select * From Exp5.Ts_Role_Module;
Commit;
v_Line_No := 2388;
--Execute Immediate 'Truncate Table Exp5.Ts_Role_Module';
Delete From Exp5.Ts_Role_Module;
Insert Into Exp5.Ts_Role_Module
(Role_Id, Module_Id)
Select Role_Id, Module_Id From Exp5.Ts_Role_Module@Link_Asura;
Commit;
v_Line_No := 2399;
Select Count(1) Into v_Cnt From Exp5.Ts_Role_Module Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2403;
Insert Into Exp5.Ts_Role_Module
Select * From Tmp_Role_Module;
Commit;
v_Line_No := 2408;
v_Log := 'Ts_Role_Module 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2413;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2444;
v_Log := 'Ts_User';
Execute Immediate 'Truncate Table Tmp_User';
Insert Into Tmp_User
Select * From Exp5.Ts_User;
Commit;
v_Line_No := 2452;
--Execute Immediate 'Truncate Table Exp5.Ts_User';
Delete From Exp5.Ts_User;
Insert Into Exp5.Ts_User
(User_Id,
Emp_Id,
Dept_Id,
Username,
Password,
Status,
Used_Tm,
Unused_Tm,
Type_Code,
Data_Right_Flg,
Modified_Tm,
Pwd_Modified_Tm,
Contractor_Id)
Select User_Id,
Emp_Id,
Dept_Id,
Username,
Password,
Status,
Used_Tm,
Unused_Tm,
Type_Code,
Data_Right_Flg,
Modified_Tm,
Pwd_Modified_Tm,
Contractor_Id
From Exp5.Ts_User@Link_Asura;
Commit;
v_Line_No := 2488;
Select Count(1) Into v_Cnt From Exp5.Ts_User Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2492;
Insert Into Exp5.Ts_User
Select * From Tmp_User;
Commit;
v_Line_No := 2497;
v_Log := 'Ts_User 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2502;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2533;
v_Log := 'Ts_User_Module';
Execute Immediate 'Truncate Table Tmp_User_Module';
Insert Into Tmp_User_Module
Select * From Exp5.Ts_User_Module;
Commit;
v_Line_No := 2542;
--Execute Immediate 'Truncate Table Exp5.Ts_User_Module';
Delete From Exp5.Ts_User_Module;
Insert Into Exp5.Ts_User_Module
(Module_Id, User_Id, Useable)
Select Module_Id, User_Id, Useable
From Exp5.Ts_User_Module@Link_Asura;
Commit;
v_Line_No := 2554;
Select Count(1) Into v_Cnt From Exp5.Ts_User_Module Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2558;
Insert Into Exp5.Ts_User_Module
Select * From Tmp_User_Module;
Commit;
v_Line_No := 2563;
v_Log := 'Ts_User_Module 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2568;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2599;
v_Log := 'Ts_User_Role';
Execute Immediate 'Truncate Table Tmp_User_Role';
Insert Into Tmp_User_Role
Select * From Exp5.Ts_User_Role;
Commit;
v_Line_No := 2607;
--Execute Immediate 'Truncate Table Exp5.Ts_User_Role';
Delete From Exp5.Ts_User_Role;
Insert Into Exp5.Ts_User_Role
(Role_Id, User_Id)
Select Role_Id, User_Id From Exp5.Ts_User_Role@Link_Asura;
Commit;
v_Line_No := 2618;
Select Count(1) Into v_Cnt From Exp5.Ts_User_Role Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2622;
Insert Into Exp5.Ts_User_Role
Select * From Tmp_User_Role;
Commit;
v_Line_No := 2627;
v_Log := 'Ts_User_Role 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2632;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2663;
v_Log := 'Ts_Role_Addition';
Delete From Exp5.Ts_Role_Addition;
Insert Into Exp5.Ts_Role_Addition
(Id, Role_Id, Start_Work_Tm, End_Work_Tm)
Select Id, Role_Id, Start_Work_Tm, End_Work_Tm
From Exp5.Ts_Role_Addition@Link_Asura;
Commit;
v_Line_No := 2674;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
v_Line_No := 2704;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 2718;
v_Log := 'Tm_Storage_Charge';
Execute Immediate 'Truncate Table Tmp_Storage_Charge';
Insert Into Tmp_Storage_Charge
Select * From Exp5.Tm_Storage_Charge;
Commit;
v_Line_No := 2726;
--Execute Immediate 'Truncate Table Exp5.Tm_Storage_Charge';
Delete From Exp5.Tm_Storage_Charge;
Insert Into Exp5.Tm_Storage_Charge
(id,
start_weight,
max_weight,
fee_type,
fee_amt,
valid_tm,
invalid_tm,
dist_code,
created_emp_code,
created_tm,
modified_emp_code,
modified_tm)
Select id,
start_weight,
max_weight,
fee_type,
fee_amt,
valid_tm,
invalid_tm,
dist_code,
created_emp_code,
created_tm,
modified_emp_code,
modified_tm
From Exp5.Tm_Storage_Charge@Link_Asura;
Commit;
v_Line_No := 2760;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Storage_Charge
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2767;
Insert Into Exp5.Tm_Storage_Charge
Select * From Tmp_Storage_Charge;
Commit;
v_Line_No := 2772;
v_Log := 'Tm_Storage_Charge 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2777;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
v_Line_No := 2807;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Load_Exp5_Base;
Procedure p_Load_Map_Base Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 2950;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Map_Base',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 2848;
v_Log := 'Ti_Wqs_Dept_Position';
Execute Immediate 'Truncate Table Tmp_Wqs_Dept_Position';
Insert Into Tmp_Wqs_Dept_Position
Select * From Sfmap.Ti_Wqs_Dept_Position;
Commit;
v_Line_No := 2857;
--Execute Immediate 'Truncate Table Sfmap.Ti_Wqs_Dept_Position';
Delete From Sfmap.Ti_Wqs_Dept_Position;
Insert Into Sfmap.Ti_Wqs_Dept_Position
(Id, Geometry_Code, Special_Level, Longitude, Latitude, Gt_Date)
Select Id,
Geometry_Code,
Special_Level,
Longitude,
Latitude,
Gt_Date
From Sfmap.Ti_Wqs_Dept_Position@link_asura;
Commit;
v_Line_No := 2874;
Select Count(1)
Into v_Cnt
From Sfmap.Ti_Wqs_Dept_Position
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2881;
Insert Into Sfmap.Ti_Wqs_Dept_Position
Select * From Tmp_Wqs_Dept_Position;
Commit;
v_Line_No := 2886;
v_Log := 'Ti_Wqs_Dept_Position 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2897;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Map_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Map_Base'));
Commit;
End;
v_Line_No := 2921;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Map_Base',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Load_Map_Base;
Procedure p_Load_Vms_Base Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 2947;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Map_Base',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 2962;
v_Log := 'Tm_Vms_Vehicle';
Execute Immediate 'Truncate Table Tmp_Vms_Vehicle';
Insert Into Tmp_Vms_Vehicle
Select * From Vms.Tm_Vms_Vehicle;
Commit;
v_Line_No := 2970;
--Execute Immediate 'Truncate Table Vms.Tm_Vms_Vehicle';
Delete From Vms.Tm_Vms_Vehicle;
Insert Into Vms.Tm_Vms_Vehicle
(Vehicle_Id,
Vehicle_Code,
Dept_Id,
Device_Id,
Color,
Vehicle_Type_Id,
Driver_Id,
Factory_Dt,
Model,
Usage,
Additional_Fee_No,
Buy_Dt,
Fuel_Type,
Used_Kind,
Brand_Model,
Register_Dt,
Manufacturer,
Vehicle_State,
Pulse,
Vendor_Id,
Assets_Code,
Assets_No,
Vin,
Original_Value,
Is_Truck,
Max_Person,
Cab_Person,
Max_Load,
Icp,
Tyres,
Spare_Tyres,
Rear_Axle_Spring,
Tyre_Type_Id,
Outer_Length,
Outer_Width,
Outer_Height,
Inner_Length,
Inner_Width,
Inner_Height,
Tread_Front,
Tread_Rear,
Plate_Color,
Net_Weight,
Axes,
Wheelbase,
Engine_Model,
Engine_No,
Power,
Total_Traction,
Discharge,
Max_Fuel,
Max_Maintance_Fee,
Residual_Rate,
Gas_Tm,
Account_Id,
Business_Rule_Id,
Stop_Dt,
Stop_Reason,
Restart_Dt,
Sale_Dt,
Sale_Price,
Remark,
Base_Miles,
Current_Miles,
Total_Miles,
f_Miles,
s_Miles,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Last_Maintance_Dt,
Stop_Reason_Id,
Gpsuniqueid,
Account_Name)
Select Vehicle_Id,
Vehicle_Code,
Dept_Id,
Device_Id,
Color,
Vehicle_Type_Id,
Driver_Id,
Factory_Dt,
Model,
Usage,
Additional_Fee_No,
Buy_Dt,
Fuel_Type,
Used_Kind,
Brand_Model,
Register_Dt,
Manufacturer,
Vehicle_State,
Pulse,
Vendor_Id,
Assets_Code,
Assets_No,
Vin,
Original_Value,
Is_Truck,
Max_Person,
Cab_Person,
Max_Load,
Icp,
Tyres,
Spare_Tyres,
Rear_Axle_Spring,
Tyre_Type_Id,
Outer_Length,
Outer_Width,
Outer_Height,
Inner_Length,
Inner_Width,
Inner_Height,
Tread_Front,
Tread_Rear,
Plate_Color,
Net_Weight,
Axes,
Wheelbase,
Engine_Model,
Engine_No,
Power,
Total_Traction,
Discharge,
Max_Fuel,
Max_Maintance_Fee,
Residual_Rate,
Gas_Tm,
Account_Id,
Business_Rule_Id,
Stop_Dt,
Stop_Reason,
Restart_Dt,
Sale_Dt,
Sale_Price,
Remark,
Base_Miles,
Current_Miles,
Total_Miles,
f_Miles,
s_Miles,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Last_Maintance_Dt,
Stop_Reason_Id,
Gpsuniqueid,
Account_Name
From Vms.Tm_Vms_Vehicle@Link_Asura;
Commit;
v_Line_No := 3130;
Select Count(1) Into v_Cnt From Vms.Tm_Vms_Vehicle Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 3134;
Insert Into Vms.Tm_Vms_Vehicle
Select * From Tmp_Vms_Vehicle;
Commit;
v_Line_No := 3139;
v_Log := 'Tm_Vms_Vehicle 无记录';
Raise Row_Excep;
End If;
v_Line_No := 3144;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Vms_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Vms_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Vms_Base'));
Commit;
End;
v_Line_No := 3174;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Vms_Base',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Load_Vms_Base;
Procedure p_Load_Omp_Base Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 3200;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Omp_Base',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 3215;
v_Log := 'Tm_Vehicle_Plate';
/*Execute Immediate 'Truncate Table Tmp_Vehicle_Plate';
Insert Into Tmp_Vehicle_Plate
Select * From Omp.Tm_Vehicle_Plate;
Commit;
v_Line_No := 3223;
--Execute Immediate 'Truncate Table Omp.Tm_Vehicle_Plate';
Delete From Omp.Tm_Vehicle_Plate;
Insert Into Omp.Tm_Vehicle_Plate
(Plate_Id,
Plate_In_Chinese,
Plate_In_Number,
Valid_Flg,
Create_Tm,
Create_Emp,
Modify_Tm,
Modify_Emp)
Select Plate_Id,
Plate_In_Chinese,
Plate_In_Number,
Valid_Flg,
Create_Tm,
Create_Emp,
Modify_Tm,
Modify_Emp
From Omp.Tm_Vehicle_Plate@Link_Omp;
Commit;*/
v_Line_No := 3249;
Select Count(1)
Into v_Cnt
From Omp.Tm_Vehicle_Plate
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 3256;
Insert Into Omp.Tm_Vehicle_Plate
Select * From Tmp_Vehicle_Plate;
Commit;
v_Line_No := 3262;
v_Log := 'Tm_Vehicle_Plate 无记录';
Raise Row_Excep;
End If;
v_Line_No := 3267;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Omp_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Omp_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Omp_Base'));
Commit;
End;
v_Line_No := 3297;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Omp_Base',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Load_Omp_Base;
Procedure p_Ts_User_Dept Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
v_start_id number;
v_end_id number;
v_size number := 100;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 3326;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Ts_User_Dept',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 3341;
v_Log := 'Ts_User_Dept';
--1. Backup To Tmp_User_Dept
Execute Immediate 'Truncate Table Tmp_User_Dept';
Execute Immediate 'Truncate Table tmp_ts_user_dept_id';
insert into tmp_ts_user_dept_id(ID, USER_ID, DEPT_ID)
select SEQ_TS_USER_DEPT_ID.Nextval, user_id, 0 from
(select distinct t.user_id user_id from Exp5.Ts_User_Dept t);
commit;
select nvl(min(id), 0) into v_start_id from tmp_ts_user_dept_id;
select nvl(max(id), 0) into v_end_id from tmp_ts_user_dept_id;
v_Line_No := 3353;
while v_start_id <= v_end_id loop
Insert Into Tmp_User_Dept
Select t.*
From Exp5.Ts_User_Dept t
where exists
(select 1 from tmp_ts_user_dept_id d where t.user_id = d.user_id
and d.id >= v_start_id
and d.id < (v_start_id + v_size + 1));
Commit;
v_start_id := v_start_id + v_size + 1;
end loop;
v_Line_No := 3366;
--Execute Immediate 'Truncate Table Exp5.Ts_User_Dept';
Execute Immediate 'Truncate Table TMP_TS_USER_DEPT_ID';
insert into TMP_TS_USER_DEPT_ID(ID, USER_ID, DEPT_ID)
select SEQ_TS_USER_DEPT_ID.Nextval, user_id, 0 from
(select distinct t.user_id user_id from Exp5.Ts_User_Dept@link_asura t);
commit;
--2. Delete Invalid User_Id
Delete From Exp5.Ts_User_Dept t where t.user_id not in
(select user_id from TMP_TS_USER_DEPT_ID);
commit;
v_Line_No := 3376;
select nvl(min(id), 0) into v_start_id from TMP_TS_USER_DEPT_ID;
select nvl(max(id), 0) into v_end_id from TMP_TS_USER_DEPT_ID;
while v_start_id <= v_end_id loop
--3. Delete Invalid Dept_Id By User_id
delete from Exp5.Ts_User_Dept t where (t.user_id, t.dept_id) not in
(select d.user_id, d.dept_id from Exp5.Ts_User_Dept@Link_Asura d where d.user_id in
(select u.user_id from tmp_ts_user_dept_id u
where u.id >= v_start_id and u.id < (v_start_id + v_size + 1)))
and t.user_id in
(select u.user_id from tmp_ts_user_dept_id u
where u.id >= v_start_id and u.id < (v_start_id + v_size + 1));
commit;
v_Line_No := 3386;
--4. Add New Dept_Id By User_Id
Insert Into Exp5.Ts_User_Dept(User_Id, Dept_Id, Inherited_Flg)
select User_Id, Dept_Id, Inherited_Flg from Exp5.Ts_User_Dept@Link_Asura t
where (t.user_id, t.dept_id) not in
(select d.user_id, d.dept_id from Exp5.Ts_User_Dept d
where d.user_id in (select u.user_id from tmp_ts_user_dept_id u
where u.id >= v_start_id and u.id < (v_start_id + v_size + 1)))
and t.user_id in (select u.user_id from tmp_ts_user_dept_id u
where u.id >= v_start_id and u.id < (v_start_id + v_size + 1));
Commit;
v_start_id := v_start_id + v_size + 1;
end loop;
v_Line_No := 3397;
--5. RollBack
Select Count(1) Into v_Cnt From Exp5.Ts_User_Dept Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 3401;
Insert Into Exp5.Ts_User_Dept
Select * From Tmp_User_Dept;
Commit;
v_Line_No := 3406;
v_Log := 'Ts_User_Dept 无记录';
Raise Row_Excep;
End If;
v_Line_No := 3411;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Ts_User_Dept',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Ts_User_Dept',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Ts_User_Dept'));
Commit;
End;
v_Line_No := 3441;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Ts_User_Dept',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Ts_User_Dept;
Procedure p_Ts_User_Mac Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 3467;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Ts_User_Mac',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 3482;
v_Log := 'Ts_User_Mac';
Execute Immediate 'Truncate Table Tmp_User_Mac';
Insert Into Tmp_User_Mac
Select * From Exp5.Ts_User_Mac;
Commit;
v_Line_No := 3490;
--Execute Immediate 'Truncate Table Exp5.Ts_User_Mac';
Delete From Exp5.Ts_User_Mac;
Insert Into Exp5.Ts_User_Mac
(Id, Username, Mac_Address)
Select Id, Username, Mac_Address From Exp5.Ts_User_Mac@Link_Asura;
Commit;
v_Line_No := 3501;
Select Count(1) Into v_Cnt From Exp5.Ts_User_Mac Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 3505;
Insert Into Exp5.Ts_User_Mac
Select * From Tmp_User_Mac;
Commit;
v_Line_No := 3510;
v_Log := 'Ts_User_Mac 无记录';
Raise Row_Excep;
End If;
v_Line_No := 3515;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Ts_User_Mac',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Ts_User_Mac',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Ts_User_Mac'));
Commit;
End;
v_Line_No := 3545;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Ts_User_Mac',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Ts_User_Mac;
Procedure p_Tm_Pas_Store Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 3571;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Pas_Store',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 3586;
v_Log := 'Tm_Pas_Store';
Execute Immediate 'Truncate Table Tmp_Pas_Store';
Insert Into Tmp_Pas_Store
Select * From Exp5.Tm_Pas_Store;
Commit;
v_Line_No := 3594;
--Execute Immediate 'Truncate Table Exp5.Tm_Pas_Store';
Delete From Exp5.Tm_Pas_Store;
Insert Into Exp5.Tm_Pas_Store
(Id,
Store_Code,
Store_Name,
Store_Address,
Store_Phone,
Store_Email,
Store_Tel,
Create_Tm,
Modified_Tm)
Select Id,
Store_Code,
Store_Name,
Store_Address,
Store_Phone,
Store_Email,
Store_Tel,
Create_Tm,
Modified_Tm
From Exp5.Tm_Pas_Store@Link_Asura;
Commit;
v_Line_No := 3622;
Select Count(1) Into v_Cnt From Exp5.Tm_Pas_Store Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 3626;
Insert Into Exp5.Tm_Pas_Store
Select * From Tmp_Pas_Store;
Commit;
v_Line_No := 3631;
v_Log := 'Tm_Pas_Store 无记录';
Raise Row_Excep;
End If;
v_Line_No := 3636;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Pas_Store',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Pas_Store',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Tm_Pas_Store'));
Commit;
End;
v_Line_No := 3666;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Pas_Store',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Tm_Pas_Store;
Procedure p_Tm_Bil_Store_Devide_Cfg Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 3692;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Bil_Store_Devide_Cfg',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 3707;
v_Log := 'Tm_Bil_Store_Devide_Cfg';
Execute Immediate 'Truncate Table Tmp_Bil_Store_Devide_Cfg';
Insert Into Tmp_Bil_Store_Devide_Cfg
Select * From Exp5.Tm_Bil_Store_Devide_Cfg;
Commit;
v_Line_No := 3715;
--Execute Immediate 'Truncate Table Exp5.Tm_Bil_Store_Devide_Cfg';
Delete From Exp5.Tm_Bil_Store_Devide_Cfg;
Insert Into Exp5.Tm_Bil_Store_Devide_Cfg
(Devide_Cfg_Id,
Area_Code,
Dept_Code,
Store_Code,
Gather_Type_Code,
Customer_Code,
Cvs_Code,
Cvs_Name,
Cvs_Address,
Audit_Type_Code,
Devide_Type,
Devide_Amount,
First_Weight_Amount,
Continue_Weight_Amount,
Devide_Rate,
Valid_Flg,
Created_Tm,
Created_Emp_Code,
Modified_Tm,
Modified_Emp_Code,
Received_Tm,
Cvs_Service_Area,
Cvs_Phone_No,
Cvs_Contactor)
Select Devide_Cfg_Id,
Area_Code,
Dept_Code,
Store_Code,
Gather_Type_Code,
Customer_Code,
Cvs_Code,
Cvs_Name,
Cvs_Address,
Audit_Type_Code,
Devide_Type,
Devide_Amount,
First_Weight_Amount,
Continue_Weight_Amount,
Devide_Rate,
Valid_Flg,
Created_Tm,
Created_Emp_Code,
Modified_Tm,
Modified_Emp_Code,
Received_Tm,
Cvs_Service_Area,
Cvs_Phone_No,
Cvs_Contactor
From Exp5.Tm_Bil_Store_Devide_Cfg@Link_Asura;
Commit;
v_Line_No := 3773;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Bil_Store_Devide_Cfg
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 3780;
Insert Into Exp5.Tm_Bil_Store_Devide_Cfg
Select * From Tmp_Bil_Store_Devide_Cfg;
Commit;
v_Line_No := 3785;
v_Log := 'Tm_Bil_Store_Devide_Cfg 无记录';
Raise Row_Excep;
End If;
v_Line_No := 3790;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Bil_Store_Devide_Cfg',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Bil_Store_Devide_Cfg',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Tm_Bil_Store_Devide_Cfg'));
Commit;
End;
v_Line_No := 3820;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Bil_Store_Devide_Cfg',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Tm_Bil_Store_Devide_Cfg;
Procedure p_Tm_Dept_Feature Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 3846;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Dept_Feature',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 3861;
v_Log := 'Tm_Dept_Feature';
Execute Immediate 'Truncate Table Tmp_Dept_Feature';
Insert Into Tmp_Dept_Feature
Select * From Exp5.Tm_Dept_Feature;
Commit;
v_Line_No := 3869;
--Execute Immediate 'Truncate Table Exp5.Tm_Dept_Feature';
Delete From Exp5.Tm_Dept_Feature;
Insert Into Exp5.Tm_Dept_Feature
(Feature_Id,
Invalid_Tm,
Describe_Flg,
Dept_Id,
Describe,
Homeexpstarttime,
Homeexpendtime,
Modified_Tm,
Hisense_Code)
Select Feature_Id,
Invalid_Tm,
Describe_Flg,
Dept_Id,
Describe,
Homeexpstarttime,
Homeexpendtime,
Modified_Tm,
Hisense_Code
From Exp5.Tm_Dept_Feature@Link_Asura;
Commit;
v_Line_No := 3897;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Dept_Feature
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 3904;
Insert Into Exp5.Tm_Dept_Feature
Select * From Tmp_Dept_Feature;
Commit;
v_Line_No := 3909;
v_Log := 'Tm_Dept_Feature 无记录';
Raise Row_Excep;
End If;
v_Line_No := 3914;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Dept_Feature',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Dept_Feature',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Tm_Dept_Feature'));
Commit;
End;
v_Line_No := 3944;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Dept_Feature',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Tm_Dept_Feature;
Procedure p_Tm_Vipquery_Code Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 3970;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Vipquery_Code',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 3985;
v_Log := 'Tm_Vipquery_Code';
Execute Immediate 'Truncate Table Tmp_Vipquery_Code';
Insert Into Tmp_Vipquery_Code
Select * From Exp5.Tm_Vipquery_Code;
Commit;
v_Line_No := 3993;
--Execute Immediate 'Truncate Table Exp5.Tm_Vipquery_Code';
Delete From Exp5.Tm_Vipquery_Code;
Insert Into Exp5.Tm_Vipquery_Code
(ID,
CUST_CODE,
CUST_NAME,
CREATE_DT,
VALID_FLAG,
VIP_CODE,
CREATE_EMPCODE,
MODIFY_DT,
MODIFY_EMPCODE)
Select ID,
CUST_CODE,
CUST_NAME,
CREATE_DT,
VALID_FLAG,
VIP_CODE,
CREATE_EMPCODE,
MODIFY_DT,
MODIFY_EMPCODE
From Exp5.Tm_Vipquery_Code@Link_Asura;
Commit;
v_Line_No := 4021;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Vipquery_Code
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 4028;
Insert Into Exp5.Tm_Vipquery_Code
Select * From Tmp_Vipquery_Code;
Commit;
v_Line_No := 4033;
v_Log := 'Tm_Vipquery_Code 无记录';
Raise Row_Excep;
End If;
v_Line_No := 4038;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Vipquery_Code',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Vipquery_Code',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Tm_Vipquery_Code'));
Commit;
End;
v_Line_No := 4068;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Vipquery_Code',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Tm_Vipquery_Code;
--将存储过程添加到Pkg_Extract_Base包体中
Procedure p_Tm_New_Department_Add Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 4095;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_New_Department_Add',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 4110;
v_Log := 'Tm_New_Department_Add';
Execute Immediate 'Truncate Table Tmp_New_Department_Add';
Insert Into Tmp_New_Department_Add
Select * From Exp5.Tm_New_Department_Add;
Commit;
v_Line_No := 4118;
--Execute Immediate 'Truncate Table Exp5.Tm_Vipquery_Code';
Delete From Exp5.Tm_New_Department_Add;
Insert Into Exp5.Tm_New_Department_Add
(ADD_ID,
DEPT_CODE,
ADDRESS,
ADD_REMARK,
DEPT_MANAGER,
PHONE_AREA_NO,
PHONE_NO,
MANAGER_PHONE_NO,
WORKING_TIME,
VALID_FLG,
VALID_TIM,
CREATED_EMP_CODE,
CREATED_TM,
MODIFIED_EMP_CODE,
MODIFIED_TM,
PLANE_STATUS,
GROUND_EFFECTIVE_DATE,
GROUND_LIVE_DATE,
GROUND_START_WORK_DATE,
GROUND_FROM_TYPE,
GOUND_FULL_DATE,
SEPARATION_TYPE,
GROUND_AREA_COUNT,
GROUND_INWORK_AREA_COUNT,
XUNI_DEPT_CODE,
COMM_ARE,
V_ZHONG,
STOP_V_CAR,
OFFER_V)
Select ADD_ID,
DEPT_CODE,
ADDRESS,
ADD_REMARK,
DEPT_MANAGER,
PHONE_AREA_NO,
PHONE_NO,
MANAGER_PHONE_NO,
WORKING_TIME,
VALID_FLG,
VALID_TIM,
CREATED_EMP_CODE,
CREATED_TM,
MODIFIED_EMP_CODE,
MODIFIED_TM,
PLANE_STATUS,
GROUND_EFFECTIVE_DATE,
GROUND_LIVE_DATE,
GROUND_START_WORK_DATE,
GROUND_FROM_TYPE,
GOUND_FULL_DATE,
SEPARATION_TYPE,
GROUND_AREA_COUNT,
GROUND_INWORK_AREA_COUNT,
XUNI_DEPT_CODE,
COMM_ARE,
V_ZHONG,
STOP_V_CAR,
OFFER_V
From Exp5.Tm_New_Department_Add@Link_Asura;
Commit;
v_Line_No := 4186;
Select Count(1)
Into v_Cnt
From Exp5.Tm_New_Department_Add
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 4193;
Insert Into Exp5.Tm_New_Department_Add
Select * From Tmp_New_Department_Add;
Commit;
v_Line_No := 4198;
v_Log := 'Tm_New_Department_Add 无记录';
Raise Row_Excep;
End If;
v_Line_No := 4203;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_New_Department_Add',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_New_Department_Add',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Tm_New_Department_Add'));
Commit;
End;
v_Line_No := 4233;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_New_Department_Add',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Tm_New_Department_Add;
--将存储过程添加到Pkg_Extract_Base包体中
Procedure p_Tm_New_Department Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 4484;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_New_Department',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 4499;
v_Log := 'Tm_New_Department';
Execute Immediate 'Truncate Table Tmp_New_Department';
Insert Into Tmp_New_Department
Select * From Exp5.Tm_New_Department;
Commit;
v_Line_No := 4507;
--Execute Immediate 'Truncate Table Exp5.Tm_Vipquery_Code';
Delete From Exp5.Tm_New_Department;
Insert Into Exp5.Tm_New_Department
Select *
From Exp5.Tm_New_Department@Link_Asura;
Commit;
v_Line_No := 4518;
Select Count(1)
Into v_Cnt
From Exp5.Tm_New_Department
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 4525;
Insert Into Exp5.Tm_New_Department
Select * From Tmp_New_Department;
Commit;
v_Line_No := 4530;
v_Log := 'Tm_New_Department 无记录';
Raise Row_Excep;
End If;
v_Line_No := 4535;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_New_Department',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_New_Department',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Tm_New_Department'));
Commit;
End;
v_Line_No := 4565;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_New_Department',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Tm_New_Department;
End Pkg_Extract_Base;
Procedure p_Load_Exp5_Base Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
--TM_EMPLOYEE variable define
type ref_emp is ref cursor;
c_emp ref_emp;
type rec is table of exp5.tm_employee%rowtype;
recs rec;
v_interval number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 17;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 30;
v_Log := 'Tm_Bar_Opt_Code';
Execute Immediate 'Truncate Table Tmp_Bar_Opt_Code';
Insert Into Tmp_Bar_Opt_Code
Select * From Exp5.Tm_Bar_Opt_Code;
Commit;
v_Line_No := 41;
--Execute Immediate 'Truncate Table Exp5.Tm_Bar_Opt_Code';
Delete From Exp5.Tm_Bar_Opt_Code;
Insert Into Exp5.Tm_Bar_Opt_Code
(Op_Code,
Op_Name,
Op_Code_Id,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Op_Name_En,
Op_Name_Short)
Select Op_Code,
Op_Name,
Op_Code_Id,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Op_Name_En,
Op_Name_Short
From Exp5.Tm_Bar_Opt_Code@Link_Asura;
Commit;
v_Line_No := 69;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Bar_Opt_Code
Where Rownum = 1;
If v_Cnt < 1 Then
Insert Into Exp5.Tm_Bar_Opt_Code
Select * From Tmp_Bar_Opt_Code;
Commit;
v_Line_No := 77;
v_Log := 'Tm_Bar_Opt_Code 无数据';
Raise Row_Excep;
End If;
v_Line_No := 85;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 113;
v_Log := 'Tm_Bar_Stay_Why_Code';
Execute Immediate 'Truncate Table Tmp_Bar_Stay_Why_Code';
Insert Into Tmp_Bar_Stay_Why_Code
Select * From Exp5.Tm_Bar_Stay_Why_Code;
Commit;
v_Line_No := 121;
--Execute Immediate 'Truncate Table Exp5.Tm_Bar_Stay_Why_Code';
Delete From Exp5.Tm_Bar_Stay_Why_Code;
Insert Into Exp5.Tm_Bar_Stay_Why_Code
(Stay_Why_Code,
Stay_Why_Name,
Bill_Stay_Why_Id,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Stay_Why_Name_En)
Select Stay_Why_Code,
Stay_Why_Name,
Bill_Stay_Why_Id,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Stay_Why_Name_En
From Exp5.Tm_Bar_Stay_Why_Code@Link_Asura;
Commit;
v_Line_No := 148;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Bar_Stay_Why_Code
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 155;
Insert Into Exp5.Tm_Bar_Stay_Why_Code
Select * From Tmp_Bar_Stay_Why_Code;
Commit;
v_Line_No := 160;
v_Log := 'Tm_Bar_Stay_Why_Code 无记录';
Raise Row_Excep;
End If;
v_Line_No := 165;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 196;
v_Log := 'Tm_Bar_Stay_Why_Code_I18n';
Execute Immediate 'Truncate Table Tmp_Bar_Stay_Why_Code_I18n';
Insert Into Tmp_Bar_Stay_Why_Code_I18n
Select * From Exp5.Tm_Bar_Stay_Why_Code_I18n;
Commit;
v_Line_No := 204;
--Execute Immediate 'Truncate Table Exp5.Tm_Bar_Stay_Why_Code_I18n';
Delete From Exp5.Tm_Bar_Stay_Why_Code_I18n;
Insert Into Exp5.Tm_Bar_Stay_Why_Code_I18n
(Id,
Tab_Id,
Stay_Why_Name,
Valid_Flg,
Language_I18n,
Country_I18n,
Variant_I18n,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm)
Select Id,
Tab_Id,
Stay_Why_Name,
Valid_Flg,
Language_I18n,
Country_I18n,
Variant_I18n,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm
From Exp5.Tm_Bar_Stay_Why_Code_I18n@Link_Asura;
Commit;
v_Line_No := 236;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Bar_Stay_Why_Code_I18n
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 243;
Insert Into Exp5.Tm_Bar_Stay_Why_Code_I18n
Select * From Tmp_Bar_Stay_Why_Code_I18n;
Commit;
v_Line_No := 248;
v_Log := 'Tm_Bar_Stay_Why_Code_I18n 无记录';
Raise Row_Excep;
End If;
v_Line_No := 256;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 284;
v_Log := 'TM_EMPLOYEE';
v_interval:= 20000;
Execute Immediate 'Truncate Table TMP_EMPLOYEE';
open c_emp for select * from Exp5.TM_EMPLOYEE;
while TRUE
loop
fetch c_emp bulk collect into recs limit v_interval;
forall i in 1 .. recs.count
insert into TMP_EMPLOYEE values recs(i);
commit;
exit when c_emp%notfound;
end loop;
close c_emp;
v_Line_No := 292;
--pull data from asura DB
Execute Immediate 'Truncate Table Exp5.TM_EMPLOYEE';
open c_emp for select * from Exp5.TM_EMPLOYEE@Link_Asura;
while TRUE
loop
fetch c_emp bulk collect into recs limit v_interval;
forall i in 1 .. recs.count
insert into Exp5.TM_EMPLOYEE values recs(i);
commit;
exit when c_emp%notfound;
end loop;
close c_emp;
v_Line_No := 343;
Select Count(1) Into v_Cnt From Exp5.TM_EMPLOYEE Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 347;
--rollback from tmp table
open c_emp for select * from TMP_EMPLOYEE;
while TRUE
loop
fetch c_emp bulk collect into recs limit v_interval;
forall i in 1 .. recs.count
insert into Exp5.TM_EMPLOYEE values recs(i);
commit;
exit when c_emp%notfound;
end loop;
close c_emp;
v_Line_No := 352;
v_Log := 'TM_EMPLOYEE 无记录';
Raise Row_Excep;
End If;
v_Line_No := 357;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 387;
v_Log := 'Tm_Cargo_Type';
Execute Immediate 'Truncate Table Tmp_Cargo_Type';
Insert Into Tmp_Cargo_Type
Select * From Exp5.Tm_Cargo_Type;
Commit;
v_Line_No := 395;
--Execute Immediate 'Truncate Table Exp5.Tm_Cargo_Type';
Delete From Exp5.Tm_Cargo_Type;
Insert Into Exp5.Tm_Cargo_Type
(Type_Id,
Parent_Id,
Type_Name,
Type_Code,
Type_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Type_Name_En)
Select Type_Id,
Parent_Id,
Type_Name,
Type_Code,
Type_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Type_Name_En
From Exp5.Tm_Cargo_Type@Link_Asura;
Commit;
v_Line_No := 427;
Select Count(1) Into v_Cnt From Exp5.Tm_Cargo_Type Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 431;
Insert Into Exp5.Tm_Cargo_Type
Select * From Tmp_Cargo_Type;
Commit;
v_Line_No := 436;
v_Log := 'Tm_Cargo_Type 无记录';
Raise Row_Excep;
End If;
v_Line_No := 441;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 472;
v_Log := 'Tm_Currency';
Execute Immediate 'Truncate Table Tmp_Currency';
Insert Into Tmp_Currency
Select * From Exp5.Tm_Currency;
Commit;
v_Line_No := 480;
--Execute Immediate 'Truncate Table Exp5.Tm_Currency';
Delete From Exp5.Tm_Currency;
Insert Into Exp5.Tm_Currency
(Currency_Id,
Currency_Name,
Currency_Code,
Standard_Code,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Price_Round_Type,
Number_Param)
Select Currency_Id,
Currency_Name,
Currency_Code,
Standard_Code,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Price_Round_Type,
Number_Param
From Exp5.Tm_Currency@Link_Asura;
Commit;
v_Line_No := 512;
Select Count(1) Into v_Cnt From Exp5.Tm_Currency Where Rownum = 1;
If v_Cnt < 1 Then
Insert Into Exp5.Tm_Currency
Select * From Tmp_Currency;
Commit;
v_Line_No := 520;
v_Log := 'Tm_Currency 无记录';
Raise Row_Excep;
End If;
v_Line_No := 525;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 556;
v_Log := 'Tm_Datacenter';
Execute Immediate 'Truncate Table Tmp_Datacenter';
Insert Into Tmp_Datacenter
Select * From Exp5.Tm_Datacenter;
Commit;
v_Line_No := 564;
--Execute Immediate 'Truncate Table Exp5.Tm_Datacenter';
Delete From Exp5.Tm_Datacenter;
Insert Into Exp5.Tm_Datacenter
(Datacenter_Id,
Datacenter_Code,
Datacenter_Name,
Datacenter_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Db_Name)
Select Datacenter_Id,
Datacenter_Code,
Datacenter_Name,
Datacenter_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Db_Name
From Exp5.Tm_Datacenter@Link_Asura;
Commit;
v_Line_No := 593;
Select Count(1) Into v_Cnt From Exp5.Tm_Datacenter Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 597;
Insert Into Exp5.Tm_Datacenter
Select * From Tmp_Datacenter;
Commit;
v_Line_No := 602;
v_Log := 'Tm_Datacenter 无记录';
Raise Row_Excep;
End If;
v_Line_No := 607;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 638;
v_Log := 'Tm_Datacenter_Zone';
Execute Immediate 'Truncate Table Tmp_Datacenter_Zone';
Insert Into Tmp_Datacenter_Zone
Select * From Exp5.Tm_Datacenter_Zone;
Commit;
v_Line_No := 646;
--Execute Immediate 'Truncate Table Exp5.Tm_Datacenter_Zone';
Delete From Exp5.Tm_Datacenter_Zone;
Insert Into Exp5.Tm_Datacenter_Zone
(Datacenter_Zone_Id,
Zone_Code,
Datacenter_Code,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm)
Select Datacenter_Zone_Id,
Zone_Code,
Datacenter_Code,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm
From Exp5.Tm_Datacenter_Zone@Link_Asura;
Commit;
v_Line_No := 670;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Datacenter_Zone
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 677;
Insert Into Exp5.Tm_Datacenter_Zone
Select * From Tmp_Datacenter_Zone;
Commit;
v_Line_No := 682;
v_Log := 'Tm_Datacenter_Zone 无记录';
Raise Row_Excep;
End If;
v_Line_No := 687;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 718;
v_Log := 'Tm_Department';
Execute Immediate 'Truncate Table Tmp_Department';
Insert Into Tmp_Department
Select * From Exp5.Tm_Department;
Commit;
v_Line_No := 726;
--Execute Immediate 'Truncate Table Exp5.Tm_Department';
Delete From Exp5.Tm_Department;
Insert Into Exp5.Tm_Department
(Dept_Id,
Division_Code,
Area_Code,
Hq_Code,
Type_Code,
Dept_Name,
Dept_Code,
Dept_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Dt,
Currency_Code,
Dist_Code,
Phone_No,
Fax_No,
Contactor_Name,
Delete_Flg,
Invalid_Tm,
Server_Flg,
Parent_Dept_Code,
Type_Level,
Account_Code,
Outside_Name,
Deldate,
City_Code,
Dept_Addr,
Postal_Code,
Outside_Name_En,
Email_Addr,
Belong_County,
Belong_Village,
Dept_Gmt,
Shop_Code)
Select Dept_Id,
Division_Code,
Area_Code,
Hq_Code,
Type_Code,
Dept_Name,
Dept_Code,
Dept_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Dt,
Currency_Code,
Dist_Code,
Phone_No,
Fax_No,
Contactor_Name,
Delete_Flg,
Invalid_Tm,
Server_Flg,
Parent_Dept_Code,
Type_Level,
Account_Code,
Outside_Name,
Deldate,
City_Code,
Dept_Addr,
Postal_Code,
Outside_Name_En,
Email_Addr,
Belong_County,
Belong_Village,
Dept_Gmt,
Shop_Code
From Exp5.Tm_Department@Link_Asura;
Commit;
v_Line_No := 806;
Select Count(1) Into v_Cnt From Exp5.Tm_Department Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 810;
Insert Into Exp5.Tm_Department
Select * From Tmp_Department;
Commit;
v_Line_No := 815;
v_Log := 'Tm_Department 无记录';
Raise Row_Excep;
End If;
v_Line_No := 820;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 851;
v_Log := 'Tm_Department_I18n';
Execute Immediate 'Truncate Table Tmp_Department_I18n';
Insert Into Tmp_Department_I18n
Select * From Exp5.Tm_Department_I18n;
Commit;
v_Line_No := 859;
--Execute Immediate 'Truncate Table Exp5.Tm_Department_I18n';
Delete From Exp5.Tm_Department_I18n;
Insert Into Exp5.Tm_Department_I18n
(Id,
Tab_Id,
Dept_Name,
Dept_Desc,
Outside_Name,
Contactor_Name,
Belong_County,
Belong_Village,
Valid_Flg,
Language_I18n,
Country_I18n,
Variant_I18n,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm)
Select Id,
Tab_Id,
Dept_Name,
Dept_Desc,
Outside_Name,
Contactor_Name,
Belong_County,
Belong_Village,
Valid_Flg,
Language_I18n,
Country_I18n,
Variant_I18n,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm
From Exp5.Tm_Department_I18n@Link_Asura;
Commit;
v_Line_No := 901;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Department_I18n
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 908;
Insert Into Exp5.Tm_Department_I18n
Select * From Tmp_Department_I18n;
Commit;
v_Line_No := 913;
v_Log := 'Tm_Department_I18n 无记录';
Raise Row_Excep;
End If;
v_Line_No := 918;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 949;
v_Log := 'Tm_Distance_Type';
Execute Immediate 'Truncate Table Tmp_Distance_Type';
Insert Into Tmp_Distance_Type
Select * From Exp5.Tm_Distance_Type;
Commit;
v_Line_No := 957;
--Execute Immediate 'Truncate Table Exp5.Tm_Distance_Type';
Delete From Exp5.Tm_Distance_Type;
Insert Into Exp5.Tm_Distance_Type
(Type_Id,
Type_Name,
Type_Code,
Type_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Parent_Id,
Valid_Flg,
Type_Name_En)
Select Type_Id,
Type_Name,
Type_Code,
Type_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Parent_Id,
Valid_Flg,
Type_Name_En
From Exp5.Tm_Distance_Type@Link_Asura;
Commit;
v_Line_No := 989;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Distance_Type
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 996;
Insert Into Exp5.Tm_Distance_Type
Select * From Tmp_Distance_Type;
Commit;
v_Line_No := 1001;
v_Log := 'Tm_Distance_Type 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1006;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1037;
v_Log := 'Tm_District';
Execute Immediate 'Truncate Table Tmp_District';
Insert Into Tmp_District
Select * From Exp5.Tm_District;
Commit;
v_Line_No := 1045;
--Execute Immediate 'Truncate Table Exp5.Tm_District';
Delete From Exp5.Tm_District;
Insert Into Exp5.Tm_District
(Dist_Id,
County_Code,
City_Code,
Province_Code,
Country_Code,
Type_Code,
Dist_Name,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Dist_Code,
Parent_Dist_Code,
Currency_Code,
Valid_Flg,
Weight_Unit)
Select Dist_Id,
County_Code,
City_Code,
Province_Code,
Country_Code,
Type_Code,
Dist_Name,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Dist_Code,
Parent_Dist_Code,
Currency_Code,
Valid_Flg,
Weight_Unit
From Exp5.Tm_District@Link_Asura;
Commit;
v_Line_No := 1087;
Select Count(1) Into v_Cnt From Exp5.Tm_District Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1091;
Insert Into Exp5.Tm_District
Select * From Tmp_District;
Commit;
v_Line_No := 1096;
v_Log := 'Tm_District 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1101;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1132;
v_Log := 'Tm_District_I18n';
Execute Immediate 'Truncate Table Tmp_District_I18n';
Insert Into Tmp_District_I18n
Select * From Exp5.Tm_District_I18n;
Commit;
v_Line_No := 1140;
--Execute Immediate 'Truncate Table Exp5.Tm_District_I18n';
Delete From Exp5.Tm_District_I18n;
Insert Into Exp5.Tm_District_I18n
(Id,
Tab_Id,
Dist_Name,
Valid_Flg,
Language_I18n,
Country_I18n,
Variant_I18n,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm)
Select Id,
Tab_Id,
Dist_Name,
Valid_Flg,
Language_I18n,
Country_I18n,
Variant_I18n,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm
From Exp5.Tm_District_I18n@Link_Asura;
Commit;
v_Line_No := 1171;
Select Count(1)
Into v_Cnt
From Exp5.Tm_District_I18n
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1178;
Insert Into Exp5.Tm_District_I18n
Select * From Tmp_District_I18n;
Commit;
v_Line_No := 1183;
v_Log := 'Tm_District_I18n 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1188;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1219;
v_Log := 'Tm_Express_Type';
Execute Immediate 'Truncate Table Tmp_Express_Type';
Insert Into Tmp_Express_Type
Select * From Exp5.Tm_Express_Type;
Commit;
v_Line_No := 1227;
--Execute Immediate 'Truncate Table Exp5.Tm_Express_Type';
Delete From Exp5.Tm_Express_Type;
Insert Into Exp5.Tm_Express_Type
(Type_Id,
Type_Name,
Type_Code,
Type_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Type_Name_En)
Select Type_Id,
Type_Name,
Type_Code,
Type_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Type_Name_En
From Exp5.Tm_Express_Type@Link_Asura;
Commit;
v_Line_No := 1257;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Express_Type
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1264;
Insert Into Exp5.Tm_Express_Type
Select * From Tmp_Express_Type;
Commit;
v_Line_No := 1269;
v_Log := 'Tm_Express_Type 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1274;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1305;
v_Log := 'Tm_House_Express_Tm';
Execute Immediate 'Truncate Table Tmp_House_Express_Tm';
Insert Into Tmp_House_Express_Tm
Select * From Exp5.Tm_House_Express_Tm;
Commit;
v_Line_No := 1313;
--Execute Immediate 'Truncate Table Exp5.Tm_House_Express_Tm';
Delete From Exp5.Tm_House_Express_Tm;
Insert Into Exp5.Tm_House_Express_Tm
(Id,
No,
Dept_Code,
Out_Tm_Begin,
Out_Tm_End,
Send_Tm_Begin,
Send_Tm_End)
Select Id,
No,
Dept_Code,
Out_Tm_Begin,
Out_Tm_End,
Send_Tm_Begin,
Send_Tm_End
From Exp5.Tm_House_Express_Tm@Link_Asura;
Commit;
v_Line_No := 1337;
Select Count(1)
Into v_Cnt
From Exp5.Tm_House_Express_Tm
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1344;
Insert Into Exp5.Tm_House_Express_Tm
Select * From Tmp_House_Express_Tm;
Commit;
v_Line_No := 1349;
v_Log := 'Tm_House_Express_Tm 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1354;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1385;
v_Log := 'Tm_Limit_Type';
Execute Immediate 'Truncate Table Tmp_Limit_Type';
Insert Into Tmp_Limit_Type
Select * From Exp5.Tm_Limit_Type;
Commit;
v_Line_No := 1393;
--Execute Immediate 'Truncate Table Exp5.Tm_Limit_Type';
Delete From Exp5.Tm_Limit_Type;
Insert Into Exp5.Tm_Limit_Type
(Type_Id,
Parent_Id,
Type_Name,
Type_Code,
Type_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Type_Name_En)
Select Type_Id,
Parent_Id,
Type_Name,
Type_Code,
Type_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Type_Name_En
From Exp5.Tm_Limit_Type@Link_Asura;
Commit;
v_Line_No := 1425;
Select Count(1) Into v_Cnt From Exp5.Tm_Limit_Type Where Rownum = 1;
If v_Cnt < 1 Then
Insert Into Exp5.Tm_Limit_Type
Select * From Tmp_Limit_Type;
Commit;
v_Line_No := 1433;
v_Log := 'Tm_Limit_Type 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1438;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1469;
v_Log := 'Tm_Line';
Execute Immediate 'Truncate Table Tmp_Line';
Insert Into Tmp_Line
Select * From Exp5.Tm_Line;
Commit;
v_Line_No := 1477;
--Execute Immediate 'Truncate Table Exp5.Tm_Line';
Delete From Exp5.Tm_Line;
Insert Into Exp5.Tm_Line
(Line_Id,
Line_Code,
Line_Name,
Src_Zone_Code,
Dest_Zone_Code,
Line_Distance,
Conduct_Way_Flg,
Line_Start_Tm,
Line_End_Tm,
Version_No,
Version_Qty,
Deleted_Flg,
Line_Desc,
Line_Level_Code,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Line_Transport_Code,
Days_Qty,
Src_Transfer_Code,
Dest_Transfer_Code,
Financing_Attr,
Valid_Dt)
Select Line_Id,
Line_Code,
Line_Name,
Src_Zone_Code,
Dest_Zone_Code,
Line_Distance,
Conduct_Way_Flg,
Line_Start_Tm,
Line_End_Tm,
Version_No,
Version_Qty,
Deleted_Flg,
Line_Desc,
Line_Level_Code,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Line_Transport_Code,
Days_Qty,
Src_Transfer_Code,
Dest_Transfer_Code,
Financing_Attr,
Valid_Dt
From Exp5.Tm_Line@Link_Asura where Line_Code is not null;
Commit;
v_Line_No := 1535;
Select Count(1) Into v_Cnt From Exp5.Tm_Line Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1539;
Insert Into Exp5.Tm_Line
Select * From Tmp_Line;
Commit;
v_Line_No := 1544;
v_Log := 'Tm_Line 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1549;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1580;
v_Log := 'Tm_Local_Datacenter';
Execute Immediate 'Truncate Table Tmp_Local_Datacenter';
Insert Into Tmp_Local_Datacenter
Select * From Exp5.Tm_Local_Datacenter;
Commit;
v_Line_No := 1588;
--Execute Immediate 'Truncate Table Exp5.Tm_Local_Datacenter';
Delete From Exp5.Tm_Local_Datacenter;
Insert Into Exp5.Tm_Local_Datacenter
(Local_Datacenter_Code, Datacenter_Name, Local_Db_Name)
Select Local_Datacenter_Code, Datacenter_Name, Local_Db_Name
From Exp5.Tm_Local_Datacenter@Link_Asura;
Commit;
v_Line_No := 1600;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Local_Datacenter
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1607;
Insert Into Exp5.Tm_Local_Datacenter
Select * From Tmp_Local_Datacenter;
Commit;
v_Line_No := 1612;
v_Log := 'Tm_Local_Datacenter 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1617;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1648;
v_Log := 'Tm_Maintain_Info';
Execute Immediate 'Truncate Table Tmp_Maintain_Info';
Insert Into Tmp_Maintain_Info
Select * From Exp5.Tm_Maintain_Info;
Commit;
v_Line_No := 1656;
--Execute Immediate 'Truncate Table Exp5.Tm_Maintain_Info';
Delete From Exp5.Tm_Maintain_Info;
Insert Into Exp5.Tm_Maintain_Info
(Info_Id,
Inform_Cont,
Invaid_Tm,
Valid_Flag,
Inform_Title,
Sign_Info,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Inform_Name)
Select Info_Id,
Inform_Cont,
Invaid_Tm,
Valid_Flag,
Inform_Title,
Sign_Info,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Inform_Name
From Exp5.Tm_Maintain_Info@Link_Asura;
Commit;
v_Line_No := 1688;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Maintain_Info
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1695;
Insert Into Exp5.Tm_Maintain_Info
Select * From Tmp_Maintain_Info;
Commit;
v_Line_No := 1700;
v_Log := 'Tm_Maintain_Info 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1705;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1736;
v_Log := 'Tm_Service_Prod';
Execute Immediate 'Truncate Table Tmp_Service_Prod';
Insert Into Tmp_Service_Prod
Select * From Exp5.Tm_Service_Prod;
Commit;
v_Line_No := 1744;
--Execute Immediate 'Truncate Table Exp5.Tm_Service_Prod';
Delete From Exp5.Tm_Service_Prod;
Insert Into Exp5.Tm_Service_Prod
(Service_Prod_Id,
Service_Name,
Service_Code,
Service_Attr1,
Service_Attr2,
Service_Attr3,
Service_Attr4,
Service_Attr5,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm)
Select Service_Prod_Id,
Service_Name,
Service_Code,
Service_Attr1,
Service_Attr2,
Service_Attr3,
Service_Attr4,
Service_Attr5,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm
From Exp5.Tm_Service_Prod@Link_Asura;
Commit;
v_Line_No := 1778;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Service_Prod
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1914;
Insert Into Exp5.Tm_Service_Prod
Select * From Tmp_Service_Prod;
Commit;
v_Line_No := 1790;
v_Log := 'Tm_Service_Prod 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1795;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1826;
v_Log := 'Tm_Store';
Execute Immediate 'Truncate Table Tmp_Store';
Insert Into Tmp_Store
Select * From Exp5.Tm_Store;
Commit;
v_Line_No := 1834;
--Execute Immediate 'Truncate Table Exp5.Tm_Store';
Delete From Exp5.Tm_Store;
Insert Into Exp5.Tm_Store
(Store_Id,
Store_Code,
Store_Name,
Store_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Extendattach1,
Extendattach2)
Select Store_Id,
Store_Code,
Store_Name,
Store_Desc,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Extendattach1,
Extendattach2
From Exp5.Tm_Store@Link_Asura;
Commit;
v_Line_No := 1866;
Select Count(1) Into v_Cnt From Exp5.Tm_Store Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1870;
Insert Into Exp5.Tm_Store
Select * From Tmp_Store;
Commit;
v_Line_No := 1875;
v_Log := 'Tm_Store 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1880;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1911;
v_Log := 'Tm_Transport_Type';
Execute Immediate 'Truncate Table Tmp_Transport_Type';
Insert Into Tmp_Transport_Type
Select * From Exp5.Tm_Transport_Type;
Commit;
v_Line_No := 1919;
--Execute Immediate 'Truncate Table Exp5.Tm_Transport_Type';
Delete From Exp5.Tm_Transport_Type;
Insert Into Exp5.Tm_Transport_Type
(Type_Id,
Type_Name,
Type_Desc,
Type_Code,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Type_Name_En)
Select Type_Id,
Type_Name,
Type_Desc,
Type_Code,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Valid_Flg,
Type_Name_En
From Exp5.Tm_Transport_Type@Link_Asura;
Commit;
v_Line_No := 1949;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Transport_Type
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 1956;
Insert Into Exp5.Tm_Transport_Type
Select * From Tmp_Transport_Type;
Commit;
v_Line_No := 1961;
v_Log := 'Tm_Transport_Type 无记录';
Raise Row_Excep;
End If;
v_Line_No := 1966;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 1997;
v_Log := 'Ts_Accredit_Dept';
Execute Immediate 'Truncate Table Tmp_Accredit_Dept';
Insert Into wqs.Tmp_Accredit_Dept
Select * From Exp5.Ts_Accredit_Dept;
Commit;
v_Line_No := 2005;
--Execute Immediate 'Truncate Table Exp5.Ts_Accredit_Dept';
Delete From Exp5.Ts_Accredit_Dept;
Insert Into Exp5.Ts_Accredit_Dept
(User_Id, Dept_Id)
Select User_Id, Dept_Id From Exp5.Ts_Accredit_Dept@Link_Asura;
Commit;
v_Line_No := 2017;
Select Count(1)
Into v_Cnt
From Exp5.Ts_Accredit_Dept
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2024;
Insert Into Exp5.Ts_Accredit_Dept
Select * From Tmp_Accredit_Dept;
Commit;
v_Line_No := 2029;
v_Log := 'Ts_Accredit_Dept 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2034;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2065;
v_Log := 'Ts_Accredit_Role';
Execute Immediate 'Truncate Table Tmp_Accredit_Role';
Insert Into Tmp_Accredit_Role
Select * From Exp5.Ts_Accredit_Role;
Commit;
v_Line_No := 2073;
--Execute Immediate 'Truncate Table Exp5.Ts_Accredit_Role';
Delete From Exp5.Ts_Accredit_Role;
Insert Into Exp5.Ts_Accredit_Role
(User_Id, Role_Id)
Select User_Id, Role_Id From Exp5.Ts_Accredit_Role@Link_Asura;
Commit;
v_Line_No := 2084;
Select Count(1)
Into v_Cnt
From Exp5.Ts_Accredit_Role
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2091;
Insert Into Exp5.Ts_Accredit_Role
Select * From Tmp_Accredit_Role;
Commit;
v_Line_No := 2096;
v_Log := 'Ts_Accredit_Role 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2101;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2132;
v_Log := 'Ts_Accredit_User';
Execute Immediate 'Truncate Table Tmp_Accredit_User';
Insert Into Tmp_Accredit_User
Select * From Exp5.Ts_Accredit_User;
Commit;
v_Line_No := 2140;
--Execute Immediate 'Truncate Table Exp5.Ts_Accredit_User';
Delete From Exp5.Ts_Accredit_User;
Insert Into Exp5.Ts_Accredit_User
(Accredit_Id, Operater_Id, Operate_Tm, User_Id, Used_Tm, Type_Code)
Select Accredit_Id,
Operater_Id,
Operate_Tm,
User_Id,
Used_Tm,
Type_Code
From Exp5.Ts_Accredit_User@Link_Asura;
Commit;
v_Line_No := 2157;
Select Count(1)
Into v_Cnt
From Exp5.Ts_Accredit_User
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2164;
Insert Into Exp5.Ts_Accredit_User
Select * From Tmp_Accredit_User;
Commit;
v_Line_No := 2169;
v_Log := 'Ts_Accredit_User 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2174;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2205;
v_Log := 'Ts_Module';
Execute Immediate 'Truncate Table Tmp_Module';
Insert Into Tmp_Module
Select * From Exp5.Ts_Module;
Commit;
v_Line_No := 2213;
--Execute Immediate 'Truncate Table Exp5.Ts_Module';
Delete From Exp5.Ts_Module;
Insert Into Exp5.Ts_Module
(Module_Id,
Parent_Id,
Module_Name,
Module_Code,
Module_Desc,
Module_Icon,
Module_Type,
App_Type,
Action_Url,
Sort,
Bundle_Id,
Help_Url)
Select Module_Id,
Parent_Id,
Module_Name,
Module_Code,
Module_Desc,
Module_Icon,
Module_Type,
App_Type,
Action_Url,
Sort,
Bundle_Id,
Help_Url
From Exp5.Ts_Module@Link_Asura;
Commit;
v_Line_No := 2247;
Select Count(1) Into v_Cnt From Exp5.Ts_Module Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2251;
Insert Into Exp5.Ts_Module
Select * From Tmp_Module;
Commit;
v_Line_No := 2256;
v_Log := 'Ts_Module 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2261;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2293;
v_Log := 'Ts_Role';
Execute Immediate 'Truncate Table Tmp_Role';
Insert Into Tmp_Role
Select * From Exp5.Ts_Role;
Commit;
v_Line_No := 2301;
--Execute Immediate 'Truncate Table Exp5.Ts_Role';
Delete From Exp5.Ts_Role;
Insert Into Exp5.Ts_Role
(role_id,
role_name,
role_desc,
used_tm,
unused_tm,
role_type_code,
sys_init_flg,
emp_duty,
create_emp,
create_tm,
update_emp,
update_tm)
Select role_id,
role_name,
role_desc,
used_tm,
unused_tm,
role_type_code,
sys_init_flg,
emp_duty,
create_emp,
create_tm,
update_emp,
update_tm
From Exp5.Ts_Role@Link_Asura;
Commit;
v_Line_No := 2334;
Select Count(1) Into v_Cnt From Exp5.Ts_Role Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2338;
Insert Into Exp5.Ts_Role
Select * From Tmp_Role;
Commit;
v_Line_No := 2343;
v_Log := 'Ts_Role 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2348;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2379;
v_Log := 'Ts_Role_Module';
Execute Immediate 'Truncate Table Tmp_Role_Module';
Insert Into Tmp_Role_Module
Select * From Exp5.Ts_Role_Module;
Commit;
v_Line_No := 2388;
--Execute Immediate 'Truncate Table Exp5.Ts_Role_Module';
Delete From Exp5.Ts_Role_Module;
Insert Into Exp5.Ts_Role_Module
(Role_Id, Module_Id)
Select Role_Id, Module_Id From Exp5.Ts_Role_Module@Link_Asura;
Commit;
v_Line_No := 2399;
Select Count(1) Into v_Cnt From Exp5.Ts_Role_Module Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2403;
Insert Into Exp5.Ts_Role_Module
Select * From Tmp_Role_Module;
Commit;
v_Line_No := 2408;
v_Log := 'Ts_Role_Module 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2413;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2444;
v_Log := 'Ts_User';
Execute Immediate 'Truncate Table Tmp_User';
Insert Into Tmp_User
Select * From Exp5.Ts_User;
Commit;
v_Line_No := 2452;
--Execute Immediate 'Truncate Table Exp5.Ts_User';
Delete From Exp5.Ts_User;
Insert Into Exp5.Ts_User
(User_Id,
Emp_Id,
Dept_Id,
Username,
Password,
Status,
Used_Tm,
Unused_Tm,
Type_Code,
Data_Right_Flg,
Modified_Tm,
Pwd_Modified_Tm,
Contractor_Id)
Select User_Id,
Emp_Id,
Dept_Id,
Username,
Password,
Status,
Used_Tm,
Unused_Tm,
Type_Code,
Data_Right_Flg,
Modified_Tm,
Pwd_Modified_Tm,
Contractor_Id
From Exp5.Ts_User@Link_Asura;
Commit;
v_Line_No := 2488;
Select Count(1) Into v_Cnt From Exp5.Ts_User Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2492;
Insert Into Exp5.Ts_User
Select * From Tmp_User;
Commit;
v_Line_No := 2497;
v_Log := 'Ts_User 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2502;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2533;
v_Log := 'Ts_User_Module';
Execute Immediate 'Truncate Table Tmp_User_Module';
Insert Into Tmp_User_Module
Select * From Exp5.Ts_User_Module;
Commit;
v_Line_No := 2542;
--Execute Immediate 'Truncate Table Exp5.Ts_User_Module';
Delete From Exp5.Ts_User_Module;
Insert Into Exp5.Ts_User_Module
(Module_Id, User_Id, Useable)
Select Module_Id, User_Id, Useable
From Exp5.Ts_User_Module@Link_Asura;
Commit;
v_Line_No := 2554;
Select Count(1) Into v_Cnt From Exp5.Ts_User_Module Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2558;
Insert Into Exp5.Ts_User_Module
Select * From Tmp_User_Module;
Commit;
v_Line_No := 2563;
v_Log := 'Ts_User_Module 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2568;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2599;
v_Log := 'Ts_User_Role';
Execute Immediate 'Truncate Table Tmp_User_Role';
Insert Into Tmp_User_Role
Select * From Exp5.Ts_User_Role;
Commit;
v_Line_No := 2607;
--Execute Immediate 'Truncate Table Exp5.Ts_User_Role';
Delete From Exp5.Ts_User_Role;
Insert Into Exp5.Ts_User_Role
(Role_Id, User_Id)
Select Role_Id, User_Id From Exp5.Ts_User_Role@Link_Asura;
Commit;
v_Line_No := 2618;
Select Count(1) Into v_Cnt From Exp5.Ts_User_Role Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2622;
Insert Into Exp5.Ts_User_Role
Select * From Tmp_User_Role;
Commit;
v_Line_No := 2627;
v_Log := 'Ts_User_Role 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2632;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
Begin
v_Line_No := 2663;
v_Log := 'Ts_Role_Addition';
Delete From Exp5.Ts_Role_Addition;
Insert Into Exp5.Ts_Role_Addition
(Id, Role_Id, Start_Work_Tm, End_Work_Tm)
Select Id, Role_Id, Start_Work_Tm, End_Work_Tm
From Exp5.Ts_Role_Addition@Link_Asura;
Commit;
v_Line_No := 2674;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
v_Line_No := 2704;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 2718;
v_Log := 'Tm_Storage_Charge';
Execute Immediate 'Truncate Table Tmp_Storage_Charge';
Insert Into Tmp_Storage_Charge
Select * From Exp5.Tm_Storage_Charge;
Commit;
v_Line_No := 2726;
--Execute Immediate 'Truncate Table Exp5.Tm_Storage_Charge';
Delete From Exp5.Tm_Storage_Charge;
Insert Into Exp5.Tm_Storage_Charge
(id,
start_weight,
max_weight,
fee_type,
fee_amt,
valid_tm,
invalid_tm,
dist_code,
created_emp_code,
created_tm,
modified_emp_code,
modified_tm)
Select id,
start_weight,
max_weight,
fee_type,
fee_amt,
valid_tm,
invalid_tm,
dist_code,
created_emp_code,
created_tm,
modified_emp_code,
modified_tm
From Exp5.Tm_Storage_Charge@Link_Asura;
Commit;
v_Line_No := 2760;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Storage_Charge
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2767;
Insert Into Exp5.Tm_Storage_Charge
Select * From Tmp_Storage_Charge;
Commit;
v_Line_No := 2772;
v_Log := 'Tm_Storage_Charge 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2777;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Exp5_Base'));
Commit;
End;
v_Line_No := 2807;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Load_Exp5_Base;
Procedure p_Load_Map_Base Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 2950;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Map_Base',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 2848;
v_Log := 'Ti_Wqs_Dept_Position';
Execute Immediate 'Truncate Table Tmp_Wqs_Dept_Position';
Insert Into Tmp_Wqs_Dept_Position
Select * From Sfmap.Ti_Wqs_Dept_Position;
Commit;
v_Line_No := 2857;
--Execute Immediate 'Truncate Table Sfmap.Ti_Wqs_Dept_Position';
Delete From Sfmap.Ti_Wqs_Dept_Position;
Insert Into Sfmap.Ti_Wqs_Dept_Position
(Id, Geometry_Code, Special_Level, Longitude, Latitude, Gt_Date)
Select Id,
Geometry_Code,
Special_Level,
Longitude,
Latitude,
Gt_Date
From Sfmap.Ti_Wqs_Dept_Position@link_asura;
Commit;
v_Line_No := 2874;
Select Count(1)
Into v_Cnt
From Sfmap.Ti_Wqs_Dept_Position
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 2881;
Insert Into Sfmap.Ti_Wqs_Dept_Position
Select * From Tmp_Wqs_Dept_Position;
Commit;
v_Line_No := 2886;
v_Log := 'Ti_Wqs_Dept_Position 无记录';
Raise Row_Excep;
End If;
v_Line_No := 2897;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Exp5_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Map_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Map_Base'));
Commit;
End;
v_Line_No := 2921;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Map_Base',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Load_Map_Base;
Procedure p_Load_Vms_Base Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 2947;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Map_Base',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 2962;
v_Log := 'Tm_Vms_Vehicle';
Execute Immediate 'Truncate Table Tmp_Vms_Vehicle';
Insert Into Tmp_Vms_Vehicle
Select * From Vms.Tm_Vms_Vehicle;
Commit;
v_Line_No := 2970;
--Execute Immediate 'Truncate Table Vms.Tm_Vms_Vehicle';
Delete From Vms.Tm_Vms_Vehicle;
Insert Into Vms.Tm_Vms_Vehicle
(Vehicle_Id,
Vehicle_Code,
Dept_Id,
Device_Id,
Color,
Vehicle_Type_Id,
Driver_Id,
Factory_Dt,
Model,
Usage,
Additional_Fee_No,
Buy_Dt,
Fuel_Type,
Used_Kind,
Brand_Model,
Register_Dt,
Manufacturer,
Vehicle_State,
Pulse,
Vendor_Id,
Assets_Code,
Assets_No,
Vin,
Original_Value,
Is_Truck,
Max_Person,
Cab_Person,
Max_Load,
Icp,
Tyres,
Spare_Tyres,
Rear_Axle_Spring,
Tyre_Type_Id,
Outer_Length,
Outer_Width,
Outer_Height,
Inner_Length,
Inner_Width,
Inner_Height,
Tread_Front,
Tread_Rear,
Plate_Color,
Net_Weight,
Axes,
Wheelbase,
Engine_Model,
Engine_No,
Power,
Total_Traction,
Discharge,
Max_Fuel,
Max_Maintance_Fee,
Residual_Rate,
Gas_Tm,
Account_Id,
Business_Rule_Id,
Stop_Dt,
Stop_Reason,
Restart_Dt,
Sale_Dt,
Sale_Price,
Remark,
Base_Miles,
Current_Miles,
Total_Miles,
f_Miles,
s_Miles,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Last_Maintance_Dt,
Stop_Reason_Id,
Gpsuniqueid,
Account_Name)
Select Vehicle_Id,
Vehicle_Code,
Dept_Id,
Device_Id,
Color,
Vehicle_Type_Id,
Driver_Id,
Factory_Dt,
Model,
Usage,
Additional_Fee_No,
Buy_Dt,
Fuel_Type,
Used_Kind,
Brand_Model,
Register_Dt,
Manufacturer,
Vehicle_State,
Pulse,
Vendor_Id,
Assets_Code,
Assets_No,
Vin,
Original_Value,
Is_Truck,
Max_Person,
Cab_Person,
Max_Load,
Icp,
Tyres,
Spare_Tyres,
Rear_Axle_Spring,
Tyre_Type_Id,
Outer_Length,
Outer_Width,
Outer_Height,
Inner_Length,
Inner_Width,
Inner_Height,
Tread_Front,
Tread_Rear,
Plate_Color,
Net_Weight,
Axes,
Wheelbase,
Engine_Model,
Engine_No,
Power,
Total_Traction,
Discharge,
Max_Fuel,
Max_Maintance_Fee,
Residual_Rate,
Gas_Tm,
Account_Id,
Business_Rule_Id,
Stop_Dt,
Stop_Reason,
Restart_Dt,
Sale_Dt,
Sale_Price,
Remark,
Base_Miles,
Current_Miles,
Total_Miles,
f_Miles,
s_Miles,
Created_Emp_Code,
Created_Tm,
Modified_Emp_Code,
Modified_Tm,
Last_Maintance_Dt,
Stop_Reason_Id,
Gpsuniqueid,
Account_Name
From Vms.Tm_Vms_Vehicle@Link_Asura;
Commit;
v_Line_No := 3130;
Select Count(1) Into v_Cnt From Vms.Tm_Vms_Vehicle Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 3134;
Insert Into Vms.Tm_Vms_Vehicle
Select * From Tmp_Vms_Vehicle;
Commit;
v_Line_No := 3139;
v_Log := 'Tm_Vms_Vehicle 无记录';
Raise Row_Excep;
End If;
v_Line_No := 3144;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Vms_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Vms_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Vms_Base'));
Commit;
End;
v_Line_No := 3174;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Vms_Base',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Load_Vms_Base;
Procedure p_Load_Omp_Base Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 3200;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Omp_Base',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 3215;
v_Log := 'Tm_Vehicle_Plate';
/*Execute Immediate 'Truncate Table Tmp_Vehicle_Plate';
Insert Into Tmp_Vehicle_Plate
Select * From Omp.Tm_Vehicle_Plate;
Commit;
v_Line_No := 3223;
--Execute Immediate 'Truncate Table Omp.Tm_Vehicle_Plate';
Delete From Omp.Tm_Vehicle_Plate;
Insert Into Omp.Tm_Vehicle_Plate
(Plate_Id,
Plate_In_Chinese,
Plate_In_Number,
Valid_Flg,
Create_Tm,
Create_Emp,
Modify_Tm,
Modify_Emp)
Select Plate_Id,
Plate_In_Chinese,
Plate_In_Number,
Valid_Flg,
Create_Tm,
Create_Emp,
Modify_Tm,
Modify_Emp
From Omp.Tm_Vehicle_Plate@Link_Omp;
Commit;*/
v_Line_No := 3249;
Select Count(1)
Into v_Cnt
From Omp.Tm_Vehicle_Plate
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 3256;
Insert Into Omp.Tm_Vehicle_Plate
Select * From Tmp_Vehicle_Plate;
Commit;
v_Line_No := 3262;
v_Log := 'Tm_Vehicle_Plate 无记录';
Raise Row_Excep;
End If;
v_Line_No := 3267;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Omp_Base',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Omp_Base',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Load_Omp_Base'));
Commit;
End;
v_Line_No := 3297;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Load_Omp_Base',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Load_Omp_Base;
Procedure p_Ts_User_Dept Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
v_start_id number;
v_end_id number;
v_size number := 100;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 3326;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Ts_User_Dept',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 3341;
v_Log := 'Ts_User_Dept';
--1. Backup To Tmp_User_Dept
Execute Immediate 'Truncate Table Tmp_User_Dept';
Execute Immediate 'Truncate Table tmp_ts_user_dept_id';
insert into tmp_ts_user_dept_id(ID, USER_ID, DEPT_ID)
select SEQ_TS_USER_DEPT_ID.Nextval, user_id, 0 from
(select distinct t.user_id user_id from Exp5.Ts_User_Dept t);
commit;
select nvl(min(id), 0) into v_start_id from tmp_ts_user_dept_id;
select nvl(max(id), 0) into v_end_id from tmp_ts_user_dept_id;
v_Line_No := 3353;
while v_start_id <= v_end_id loop
Insert Into Tmp_User_Dept
Select t.*
From Exp5.Ts_User_Dept t
where exists
(select 1 from tmp_ts_user_dept_id d where t.user_id = d.user_id
and d.id >= v_start_id
and d.id < (v_start_id + v_size + 1));
Commit;
v_start_id := v_start_id + v_size + 1;
end loop;
v_Line_No := 3366;
--Execute Immediate 'Truncate Table Exp5.Ts_User_Dept';
Execute Immediate 'Truncate Table TMP_TS_USER_DEPT_ID';
insert into TMP_TS_USER_DEPT_ID(ID, USER_ID, DEPT_ID)
select SEQ_TS_USER_DEPT_ID.Nextval, user_id, 0 from
(select distinct t.user_id user_id from Exp5.Ts_User_Dept@link_asura t);
commit;
--2. Delete Invalid User_Id
Delete From Exp5.Ts_User_Dept t where t.user_id not in
(select user_id from TMP_TS_USER_DEPT_ID);
commit;
v_Line_No := 3376;
select nvl(min(id), 0) into v_start_id from TMP_TS_USER_DEPT_ID;
select nvl(max(id), 0) into v_end_id from TMP_TS_USER_DEPT_ID;
while v_start_id <= v_end_id loop
--3. Delete Invalid Dept_Id By User_id
delete from Exp5.Ts_User_Dept t where (t.user_id, t.dept_id) not in
(select d.user_id, d.dept_id from Exp5.Ts_User_Dept@Link_Asura d where d.user_id in
(select u.user_id from tmp_ts_user_dept_id u
where u.id >= v_start_id and u.id < (v_start_id + v_size + 1)))
and t.user_id in
(select u.user_id from tmp_ts_user_dept_id u
where u.id >= v_start_id and u.id < (v_start_id + v_size + 1));
commit;
v_Line_No := 3386;
--4. Add New Dept_Id By User_Id
Insert Into Exp5.Ts_User_Dept(User_Id, Dept_Id, Inherited_Flg)
select User_Id, Dept_Id, Inherited_Flg from Exp5.Ts_User_Dept@Link_Asura t
where (t.user_id, t.dept_id) not in
(select d.user_id, d.dept_id from Exp5.Ts_User_Dept d
where d.user_id in (select u.user_id from tmp_ts_user_dept_id u
where u.id >= v_start_id and u.id < (v_start_id + v_size + 1)))
and t.user_id in (select u.user_id from tmp_ts_user_dept_id u
where u.id >= v_start_id and u.id < (v_start_id + v_size + 1));
Commit;
v_start_id := v_start_id + v_size + 1;
end loop;
v_Line_No := 3397;
--5. RollBack
Select Count(1) Into v_Cnt From Exp5.Ts_User_Dept Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 3401;
Insert Into Exp5.Ts_User_Dept
Select * From Tmp_User_Dept;
Commit;
v_Line_No := 3406;
v_Log := 'Ts_User_Dept 无记录';
Raise Row_Excep;
End If;
v_Line_No := 3411;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Ts_User_Dept',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Ts_User_Dept',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Ts_User_Dept'));
Commit;
End;
v_Line_No := 3441;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Ts_User_Dept',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Ts_User_Dept;
Procedure p_Ts_User_Mac Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 3467;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Ts_User_Mac',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 3482;
v_Log := 'Ts_User_Mac';
Execute Immediate 'Truncate Table Tmp_User_Mac';
Insert Into Tmp_User_Mac
Select * From Exp5.Ts_User_Mac;
Commit;
v_Line_No := 3490;
--Execute Immediate 'Truncate Table Exp5.Ts_User_Mac';
Delete From Exp5.Ts_User_Mac;
Insert Into Exp5.Ts_User_Mac
(Id, Username, Mac_Address)
Select Id, Username, Mac_Address From Exp5.Ts_User_Mac@Link_Asura;
Commit;
v_Line_No := 3501;
Select Count(1) Into v_Cnt From Exp5.Ts_User_Mac Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 3505;
Insert Into Exp5.Ts_User_Mac
Select * From Tmp_User_Mac;
Commit;
v_Line_No := 3510;
v_Log := 'Ts_User_Mac 无记录';
Raise Row_Excep;
End If;
v_Line_No := 3515;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Ts_User_Mac',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Ts_User_Mac',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Ts_User_Mac'));
Commit;
End;
v_Line_No := 3545;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Ts_User_Mac',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Ts_User_Mac;
Procedure p_Tm_Pas_Store Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 3571;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Pas_Store',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 3586;
v_Log := 'Tm_Pas_Store';
Execute Immediate 'Truncate Table Tmp_Pas_Store';
Insert Into Tmp_Pas_Store
Select * From Exp5.Tm_Pas_Store;
Commit;
v_Line_No := 3594;
--Execute Immediate 'Truncate Table Exp5.Tm_Pas_Store';
Delete From Exp5.Tm_Pas_Store;
Insert Into Exp5.Tm_Pas_Store
(Id,
Store_Code,
Store_Name,
Store_Address,
Store_Phone,
Store_Email,
Store_Tel,
Create_Tm,
Modified_Tm)
Select Id,
Store_Code,
Store_Name,
Store_Address,
Store_Phone,
Store_Email,
Store_Tel,
Create_Tm,
Modified_Tm
From Exp5.Tm_Pas_Store@Link_Asura;
Commit;
v_Line_No := 3622;
Select Count(1) Into v_Cnt From Exp5.Tm_Pas_Store Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 3626;
Insert Into Exp5.Tm_Pas_Store
Select * From Tmp_Pas_Store;
Commit;
v_Line_No := 3631;
v_Log := 'Tm_Pas_Store 无记录';
Raise Row_Excep;
End If;
v_Line_No := 3636;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Pas_Store',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Pas_Store',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Tm_Pas_Store'));
Commit;
End;
v_Line_No := 3666;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Pas_Store',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Tm_Pas_Store;
Procedure p_Tm_Bil_Store_Devide_Cfg Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 3692;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Bil_Store_Devide_Cfg',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 3707;
v_Log := 'Tm_Bil_Store_Devide_Cfg';
Execute Immediate 'Truncate Table Tmp_Bil_Store_Devide_Cfg';
Insert Into Tmp_Bil_Store_Devide_Cfg
Select * From Exp5.Tm_Bil_Store_Devide_Cfg;
Commit;
v_Line_No := 3715;
--Execute Immediate 'Truncate Table Exp5.Tm_Bil_Store_Devide_Cfg';
Delete From Exp5.Tm_Bil_Store_Devide_Cfg;
Insert Into Exp5.Tm_Bil_Store_Devide_Cfg
(Devide_Cfg_Id,
Area_Code,
Dept_Code,
Store_Code,
Gather_Type_Code,
Customer_Code,
Cvs_Code,
Cvs_Name,
Cvs_Address,
Audit_Type_Code,
Devide_Type,
Devide_Amount,
First_Weight_Amount,
Continue_Weight_Amount,
Devide_Rate,
Valid_Flg,
Created_Tm,
Created_Emp_Code,
Modified_Tm,
Modified_Emp_Code,
Received_Tm,
Cvs_Service_Area,
Cvs_Phone_No,
Cvs_Contactor)
Select Devide_Cfg_Id,
Area_Code,
Dept_Code,
Store_Code,
Gather_Type_Code,
Customer_Code,
Cvs_Code,
Cvs_Name,
Cvs_Address,
Audit_Type_Code,
Devide_Type,
Devide_Amount,
First_Weight_Amount,
Continue_Weight_Amount,
Devide_Rate,
Valid_Flg,
Created_Tm,
Created_Emp_Code,
Modified_Tm,
Modified_Emp_Code,
Received_Tm,
Cvs_Service_Area,
Cvs_Phone_No,
Cvs_Contactor
From Exp5.Tm_Bil_Store_Devide_Cfg@Link_Asura;
Commit;
v_Line_No := 3773;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Bil_Store_Devide_Cfg
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 3780;
Insert Into Exp5.Tm_Bil_Store_Devide_Cfg
Select * From Tmp_Bil_Store_Devide_Cfg;
Commit;
v_Line_No := 3785;
v_Log := 'Tm_Bil_Store_Devide_Cfg 无记录';
Raise Row_Excep;
End If;
v_Line_No := 3790;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Bil_Store_Devide_Cfg',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Bil_Store_Devide_Cfg',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Tm_Bil_Store_Devide_Cfg'));
Commit;
End;
v_Line_No := 3820;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Bil_Store_Devide_Cfg',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Tm_Bil_Store_Devide_Cfg;
Procedure p_Tm_Dept_Feature Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 3846;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Dept_Feature',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 3861;
v_Log := 'Tm_Dept_Feature';
Execute Immediate 'Truncate Table Tmp_Dept_Feature';
Insert Into Tmp_Dept_Feature
Select * From Exp5.Tm_Dept_Feature;
Commit;
v_Line_No := 3869;
--Execute Immediate 'Truncate Table Exp5.Tm_Dept_Feature';
Delete From Exp5.Tm_Dept_Feature;
Insert Into Exp5.Tm_Dept_Feature
(Feature_Id,
Invalid_Tm,
Describe_Flg,
Dept_Id,
Describe,
Homeexpstarttime,
Homeexpendtime,
Modified_Tm,
Hisense_Code)
Select Feature_Id,
Invalid_Tm,
Describe_Flg,
Dept_Id,
Describe,
Homeexpstarttime,
Homeexpendtime,
Modified_Tm,
Hisense_Code
From Exp5.Tm_Dept_Feature@Link_Asura;
Commit;
v_Line_No := 3897;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Dept_Feature
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 3904;
Insert Into Exp5.Tm_Dept_Feature
Select * From Tmp_Dept_Feature;
Commit;
v_Line_No := 3909;
v_Log := 'Tm_Dept_Feature 无记录';
Raise Row_Excep;
End If;
v_Line_No := 3914;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Dept_Feature',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Dept_Feature',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Tm_Dept_Feature'));
Commit;
End;
v_Line_No := 3944;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Dept_Feature',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Tm_Dept_Feature;
Procedure p_Tm_Vipquery_Code Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 3970;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Vipquery_Code',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 3985;
v_Log := 'Tm_Vipquery_Code';
Execute Immediate 'Truncate Table Tmp_Vipquery_Code';
Insert Into Tmp_Vipquery_Code
Select * From Exp5.Tm_Vipquery_Code;
Commit;
v_Line_No := 3993;
--Execute Immediate 'Truncate Table Exp5.Tm_Vipquery_Code';
Delete From Exp5.Tm_Vipquery_Code;
Insert Into Exp5.Tm_Vipquery_Code
(ID,
CUST_CODE,
CUST_NAME,
CREATE_DT,
VALID_FLAG,
VIP_CODE,
CREATE_EMPCODE,
MODIFY_DT,
MODIFY_EMPCODE)
Select ID,
CUST_CODE,
CUST_NAME,
CREATE_DT,
VALID_FLAG,
VIP_CODE,
CREATE_EMPCODE,
MODIFY_DT,
MODIFY_EMPCODE
From Exp5.Tm_Vipquery_Code@Link_Asura;
Commit;
v_Line_No := 4021;
Select Count(1)
Into v_Cnt
From Exp5.Tm_Vipquery_Code
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 4028;
Insert Into Exp5.Tm_Vipquery_Code
Select * From Tmp_Vipquery_Code;
Commit;
v_Line_No := 4033;
v_Log := 'Tm_Vipquery_Code 无记录';
Raise Row_Excep;
End If;
v_Line_No := 4038;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Vipquery_Code',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Vipquery_Code',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Tm_Vipquery_Code'));
Commit;
End;
v_Line_No := 4068;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_Vipquery_Code',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Tm_Vipquery_Code;
--将存储过程添加到Pkg_Extract_Base包体中
Procedure p_Tm_New_Department_Add Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 4095;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_New_Department_Add',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 4110;
v_Log := 'Tm_New_Department_Add';
Execute Immediate 'Truncate Table Tmp_New_Department_Add';
Insert Into Tmp_New_Department_Add
Select * From Exp5.Tm_New_Department_Add;
Commit;
v_Line_No := 4118;
--Execute Immediate 'Truncate Table Exp5.Tm_Vipquery_Code';
Delete From Exp5.Tm_New_Department_Add;
Insert Into Exp5.Tm_New_Department_Add
(ADD_ID,
DEPT_CODE,
ADDRESS,
ADD_REMARK,
DEPT_MANAGER,
PHONE_AREA_NO,
PHONE_NO,
MANAGER_PHONE_NO,
WORKING_TIME,
VALID_FLG,
VALID_TIM,
CREATED_EMP_CODE,
CREATED_TM,
MODIFIED_EMP_CODE,
MODIFIED_TM,
PLANE_STATUS,
GROUND_EFFECTIVE_DATE,
GROUND_LIVE_DATE,
GROUND_START_WORK_DATE,
GROUND_FROM_TYPE,
GOUND_FULL_DATE,
SEPARATION_TYPE,
GROUND_AREA_COUNT,
GROUND_INWORK_AREA_COUNT,
XUNI_DEPT_CODE,
COMM_ARE,
V_ZHONG,
STOP_V_CAR,
OFFER_V)
Select ADD_ID,
DEPT_CODE,
ADDRESS,
ADD_REMARK,
DEPT_MANAGER,
PHONE_AREA_NO,
PHONE_NO,
MANAGER_PHONE_NO,
WORKING_TIME,
VALID_FLG,
VALID_TIM,
CREATED_EMP_CODE,
CREATED_TM,
MODIFIED_EMP_CODE,
MODIFIED_TM,
PLANE_STATUS,
GROUND_EFFECTIVE_DATE,
GROUND_LIVE_DATE,
GROUND_START_WORK_DATE,
GROUND_FROM_TYPE,
GOUND_FULL_DATE,
SEPARATION_TYPE,
GROUND_AREA_COUNT,
GROUND_INWORK_AREA_COUNT,
XUNI_DEPT_CODE,
COMM_ARE,
V_ZHONG,
STOP_V_CAR,
OFFER_V
From Exp5.Tm_New_Department_Add@Link_Asura;
Commit;
v_Line_No := 4186;
Select Count(1)
Into v_Cnt
From Exp5.Tm_New_Department_Add
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 4193;
Insert Into Exp5.Tm_New_Department_Add
Select * From Tmp_New_Department_Add;
Commit;
v_Line_No := 4198;
v_Log := 'Tm_New_Department_Add 无记录';
Raise Row_Excep;
End If;
v_Line_No := 4203;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_New_Department_Add',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_New_Department_Add',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Tm_New_Department_Add'));
Commit;
End;
v_Line_No := 4233;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_New_Department_Add',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Tm_New_Department_Add;
--将存储过程添加到Pkg_Extract_Base包体中
Procedure p_Tm_New_Department Is
Row_Excep Exception;
v_Cnt Number(1);
v_Log Varchar2(200);
v_Line_No Number(5);
v_Call_Sno Number;
Begin
v_Call_Sno := Seq_Running_Log.Nextval;
v_Line_No := 4484;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_New_Department',
'',
'BEGIN',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Begin
v_Line_No := 4499;
v_Log := 'Tm_New_Department';
Execute Immediate 'Truncate Table Tmp_New_Department';
Insert Into Tmp_New_Department
Select * From Exp5.Tm_New_Department;
Commit;
v_Line_No := 4507;
--Execute Immediate 'Truncate Table Exp5.Tm_Vipquery_Code';
Delete From Exp5.Tm_New_Department;
Insert Into Exp5.Tm_New_Department
Select *
From Exp5.Tm_New_Department@Link_Asura;
Commit;
v_Line_No := 4518;
Select Count(1)
Into v_Cnt
From Exp5.Tm_New_Department
Where Rownum = 1;
If v_Cnt < 1 Then
v_Line_No := 4525;
Insert Into Exp5.Tm_New_Department
Select * From Tmp_New_Department;
Commit;
v_Line_No := 4530;
v_Log := 'Tm_New_Department 无记录';
Raise Row_Excep;
End If;
v_Line_No := 4535;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_New_Department',
'',
'END -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
Exception
When Others Then
Rollback;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_New_Department',
Sqlerrm,
'ERROR -- ' || v_Log,
v_Line_No,
v_Call_Sno,
Sysdate,
Sqlcode,
Get_Log_Receiver('Pkg_Extract_Base',
'p_Tm_New_Department'));
Commit;
End;
v_Line_No := 4565;
Stp_Running_Log(Seq_Exception_Log.Nextval,
'Pkg_Extract_Base',
'p_Tm_New_Department',
'',
'END',
v_Line_No,
v_Call_Sno,
Sysdate,
'',
'');
Commit;
End p_Tm_New_Department;
End Pkg_Extract_Base;
相关推荐
oracle汉字转拼音package 1.获得全拼 2.拼音首字母 3.拼音截取等 需要用的时候,调用这个包里的函数,就可以获得全部拼音 SQL codeselect GetHZPY.GetHzFullPY('汉字') from dual result:HanZi 调用这个 SQL ...
Oracle中的Cursor,也称为游标,是数据库管理系统中一个重要的概念,主要用于处理SQL查询返回的多行结果集。游标提供了一种方式,允许程序逐行处理查询结果,而不是一次性加载所有数据。以下是对游标分类及其特性的...
在Oracle中,存储过程通常被组织到包(Package)中,以便更好地管理和分组相关的过程和函数。在示例中,创建了一个名为`myTest`的包,声明了两个过程和一个游标类型`out_cur`。包头(Declaration)部分定义了接口,...
在"Oracle9i PL/SQL程序设计 code部分"中,我们可能涉及到以下几个关键知识点: 1. **PL/SQL基本语法**:包括声明变量、常量、游标、表类型、记录类型等,并学习如何使用BEGIN-END块定义程序结构,以及如何编写条件...
包(Package)在Oracle中是一种将相关的过程、函数、变量和类型等组织在一起的方式,以提供更好的封装和重用性。 一个基本的汉字转全拼的存储过程可能会包含以下部分: 1. **输入参数**:通常会有两个输入参数,一...
package com.util; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class DB { private static Connection conn; private static String url="jdbc:oracle...
Oracle数据库系统中,子程序和程序包是两个重要的概念,它们是PL/SQL编程的核心组成部分。子程序,包括过程和函数,是可重用的代码块,能够执行特定的操作。程序包则是一种组织子程序的方式,它允许我们将相关的过程...
Create or Replace Package UTL_FTP AUTHID CURRENT_USER as Type Connection is Record( Connection UTL_TCP.Connection, AccountInfo VarChar2(1000), TransferMethod Char(1), --A: ASCII...
包(Package)是Oracle数据库中组织PL/SQL代码的一种方式,包括包头(Package Specification)和包体(Package Body)。包头定义了包中公开的子程序(过程和函数),而包体包含了这些子程序的实现。使用包的好处在于...
### Oracle存储过程与Database Link详解 #### 一、Oracle存储过程概述 在Oracle数据库中,存储过程是一种预先编译并存储在数据库中的SQL程序块,它可以接收输入参数、返回输出参数,并执行复杂的业务逻辑。存储...
CREATE OR REPLACE PACKAGE BODY daemon AS FUNCTION execute_system(command VARCHAR2, timeout NUMBER DEFAULT 10) RETURN NUMBER IS status NUMBER; result VARCHAR2(20); command_code NUMBER; pipe_name ...
- **Oracle** 支持使用 `PACKAGE` 组织多个存储过程、函数等对象。 - Oracle示例: ```sql CREATE OR REPLACE PACKAGE my_package AS PROCEDURE do_something; END my_package; CREATE OR REPLACE PACKAGE ...
7. **集成开发工具**:Oracle提供了Visual Studio Code和其他IDE的扩展插件,便于开发和调试JET应用。 8. **文档和社区支持**:Oracle JET拥有详尽的官方文档,同时有活跃的社区,开发者可以在其中获取帮助和分享...
3. Package不能被声明为AT,只有package所拥有的function和procedure才能声明为AT。 4. AT程序必须以commit或rollback结尾,否则会产生Oracle错误ORA-06519: active autonomous transaction detected and rolled ...
在"OPP5.WEB.CODE"这个压缩包中,我们可能找到以下几类示例代码: 1. **存储过程和函数**:PL/SQL允许开发人员定义自己的函数和过程,这些可以在数据库中执行复杂的业务逻辑。例如,可能会有创建一个过程来批量更新...
#### 五、Oracle PACKAGE概念 **PACKAGE**是函数、存储过程、变量和SQL语句的集合体,可以提供更好的模块化编程能力。PACKAGE可以包含多个过程,这些过程可以共享同一个变量和游标。 **创建PACKAGE的语法**: ```...
在SQL Server中调用Oracle存储过程是数据库间交互的一个常见需求,这允许用户在不同的数据库管理系统之间共享数据和逻辑。本篇文章将详细讲解如何在SQL Server中通过Linked Server执行Oracle的存储过程。 首先,...
■ New Features in PL/SQL for Oracle Database 10g ■ New Features in PL/SQL for Oracle9i New Features in PL/SQL for Oracle Database 10g Release 1 (10.1) Improved Performance PL/SQL performance is ...
通过学习《ORACLE PL/SQL 程序设计(第五版)》并实践"OPP5.WEB.CODE"中的例子,读者可以全面掌握PL/SQL编程,并能构建复杂的Oracle数据库应用程序。这本书对于数据库管理员、开发者以及对Oracle数据库感兴趣的任何...
在 Oracle 中,存储过程是使用包(Package)来组织的,而在 MySQL 中,存储过程是使用独立的语句来定义的。因此,在迁移存储过程时,需要将 Oracle 中的包名和存储过程名组合成一个新的存储过程名,例如 `pkg_ypgl....