Trigger example 2 in Oracle 2

xiaoxiao2021-03-05  21

Procedure DCGN_DCCM_CRC (

In_period in varcha2,

IN_SOC in varchar2,

IN_ACTV_DATE IN VARCHAR2,

o_soc_rcc_amt out number,

o_ind out charr

)

IS

- Working Variables

NBase_AMT Number (19, 4) Default 0;

Namt Number (19, 4) Default 0;

Nmax_rate Number (19, 4) Default 0;

Nmin_Rate Number (19, 4) Default 0;

NTMP_AMT NUMBER (19, 4) Default 0;

Bissocfound Boolean Default False DEFAULT FALSE

vservice_feature varchar2 (10); -: 1: 2

VSOC Char (9);

DEFFECTIVE_DATE DATE;

VFEATURE_CODE CHAR (6);

CRC_CHARGE_LVL_CODE CHAR (1);

CRC_USG_DEPEND_CODE CHAR (1);

CRC_RATE_QTY_TYPE CHAR (1);

VSOC_V Char (9);

Veffective_date_v varchar2 (14);

VFEATURE_CODE_V CHAR (6);

BAMT_CAL_IND BOOLEAN;

NAMT_WS Number (19, 4);

BSOC_IND BOOLEAN;

Twhen TimeStamp (3);

Ierr_code integer;

VMSG varchar2 (255);

Begin

Begin

SELECT RATE_FTR.SOC, RATE_FTR.EFFECTIVE_DATE,

Rate_ftr.feature_code, rate_ftr.rc_charge_lvl_code,

Rate_ftr.rc_usg_depend_code, rate_ftr.rc_rate_qty_type

INTO VSOC, DEFFECTIVE_DATE,

VFEATURE_CODE, CRC_CHARGE_LVL_CODE,

CRC_USG_DEPEND_CODE, CRC_RATE_QTY_TYPE

From rated_feature rate_ftr, Feature FTR

WHERE RATE_FTR.SOC = IN_SOC

And rate_ftr.effective_date <= to_date (in_Actv_date, 'YYYYMMDD')

And nVL (to_ftr.expiration_date, 'yyyymmdd'),

'47001231'

> = in_Actv_date

And rate_ftr.rc_info_ind = 'y'

And rate_ftr.feature_code = ftr.feature_codeand ftr.Feature_group = 'sf'

And ftr.period = rate_ftr.period

And ftr.period = in_Period;

EXCEPTION

When no_data_found

THEN

END;

END;

转载请注明原文地址:https://www.9cbs.com/read-38344.html

New Post(0)