日期:2014-05-18 浏览次数:20697 次
数据表:
-- Create table
create table DATE_JH_INC_UDR_01
(
SERIAL_NUMBER VARCHAR2(16) not null,
OPR_TYPE VARCHAR2(10) not null,
SERV_CODE VARCHAR2(10) not null,
SP_CODE VARCHAR2(10) not null,
OPER_CODE VARCHAR2(20) not null,
INPUT_START_DATE DATE,
INPUT_END_DATE DATE,
OPR_TIME DATE,
EFF_TIME DATE not null,
OPR_SOURCE VARCHAR2(10),
THIRD_DN VARCHAR2(30),
CHRG_TYPE VARCHAR2(10)
);
-- Create/Recreate primary, unique and foreign key constraints
alter table DATE_JH_INC_UDR_01
add constraint PK_DATE_JH_INC_UDR_01 primary key (SERIAL_NUMBER, OPR_TYPE, SERV_CODE, SP_CODE, OPER_CODE, EFF_TIME);
-- Create/Recreate indexes
create index IDX_DATE_JH_INC_UDR_011 on DATE_JH_INC_UDR_01 (SP_CODE, OPER_CODE);
数据库准备:
CREATE OR REPLACE TYPE D_SERIAL_NUMBER IS TABLE OF NVARCHAR2(16);
CREATE OR REPLACE TYPE D_OPR_TYPE IS TABLE OF NVARCHAR2(2);
CREATE OR REPLACE TYPE D_SERV_CODE IS TABLE OF NUMBER(10);
CREATE OR REPLACE TYPE D_SP_CODE IS TABLE OF NVARCHAR2(10);
CREATE OR REPLACE TYPE D_OPER_CODE IS TABLE OF NVARCHAR2(20);
CREATE OR REPLACE TYPE D_INPUT_START_DATE IS TABLE OF NVARCHAR2(25);
CREATE OR REPLACE TYPE D_INPUT_END_DATE IS TABLE OF NVARCHAR2(25);
CREATE OR REPLACE TYPE D_OPR_TIME IS TABLE OF NVARCHAR2(25);
CREATE OR REPLACE TYPE D_EFF_TIME IS TABLE OF NVARCHAR2(25);
CREATE OR REPLACE TYPE D_OPR_SOURCE IS TABLE OF NVARCHAR2(2);
CREATE OR REPLACE TYPE D_THIRD_DN IS TABLE OF NVARCHAR2(30);
CREATE OR REPLACE TYPE D_CHRG_TYPE IS TABLE OF NVARCHAR2(2);
CREATE OR REPLACE PROCEDURE ARRAY_TO_IBOSS_UDR2(V_1 D_SERIAL_NUMBER,V_2 D_OPR_TYPE,V_3 D_SERV_CODE,V_4 D_SP_CODE,V_5 D_OPER_CODE,V_6 D_INPUT_START_DATE,V_7 D_INPUT_END_DATE,V_8 D_OPR_TIME,V_9 D_EFF_TIME,V_10 D_OPR_SOURCE,V_11 D_THIRD_DN,V_12 D_CHRG_TYPE,O_ERR OUT VARCHAR2,SUCC_COUNT OUT NUMBER,FAIL_COUNT OUT NUMBER)