Home > database >  Error 1305 - FUNCTION in MySQL to execute the stored procedure cr_debug. ENTER_MODULE2 does not exis
Error 1305 - FUNCTION in MySQL to execute the stored procedure cr_debug. ENTER_MODULE2 does not exis

Time:10-01

A stored procedure is not cr_debug. ENTER_MODULE2 this method, and can be executed on another environment, this is what circumstance

CodePudding user response:

[code=SQL] BEGIN
DECLARE tRiskAmnt DECIMAL;
DECLARE t_sql VARCHAR (4000);
DECLARE t_count decimal;
DECLARE t_ReceiveFlag VARCHAR (20);
DECLARE t_Amnt decimal (16, 2);
DECLARE t_Riskcode varchar (20);
DECLARE t_Mult decimal (20, 5);
DECLARE t_InsuYear int.
DECLARE t_Interval integer;
DECLARE t_command varchar (200);
DECLARE t_DutyCode varchar (10);
DECLARE t_AppAge decimal;
DECLARE t_Sex varchar (1);
DECLARE t_PayEndYear int.
DECLARE t_PayIntv int.
DECLARE t_temp_SumAmnt decimal;
DECLARE t_Interval_temp date;
DECLARE t_Exflag decimal;
DECLARE t_Exlcsflag decimal;
DECLARE t_Exlcflag decimal;
DECLARE t_Prem decimal (16, 2);
DECLARE t_SumPrem decimal (16, 2);
DECLARE t_birthday varchar (20);
DECLARE t_PayYears int.
DECLARE t_MainPolNo varchar (20);
DECLARE Amnt1 decimal (16, 2);
DECLARE InsuredNo1 varchar (24);
DECLARE Riskcode1 varchar (20);
DECLARE Mult1 decimal (20, 5);
DECLARE Cvalidate1 date;
DECLARE PayEndYear1 int.
DECLARE insuyear1 int.
DECLARE PayIntv1 int.
DECLARE polno1 varchar (20);
DECLARE appflag1 varchar (1);
DECLARE contno1 varchar (20);
DECLARE Prem1 decimal (16, 2);
DECLARE SumPrem1 decimal (16, 2);
DECLARE Birthday1 VARCHAR (10);
DECLARE PayYears1 int.
DECLARE Mainpolno1 varchar (20);
DECLARE the done int the DEFAULT 0;
DECLARE cur_ybth CURSOR FOR the select LCPol. Amnt * GETDomesticRate Amnt LCPol. Currency, ' ',
LCPol InsuredNo,
LCPol Riskcode,
LCPol Mult,
LCPol Cvalidate,
LCPol PayEndYear,
LCPol insuyear,
LCPol PayIntv,
LCPol polno,
Lcpol appflag,
LCPol contno,
LCPol. Prem * GETDomesticRate (LCPol currency, ' ') Prem,
LCPol. SumPrem * GETDomesticRate SumPrem LCPol. Currency, ' ',
DATE_FORMAT (LCPol Insuredbirthday, 'Y - m - % d % %) Birthday,
LCPol PayYears,
LCPol. Mainpolno
The from LCPol, lcinsuredrelated
Where LCPol. Polno=lcinsuredrelated. Polno
And lcinsuredrelated. Customerno='0000052605'
And LCPol. Appflag in (' 0 ', '1', '2', '9')
And (LCPol Uwflag & lt;> '1' and LCPol. Uwflag & lt;> '2' and
LCPol. Uwflag & lt;> 'a')
And not the exists
(SELECT 1
The FROM lmriskapp
WHERE LCPol. Riskcode=lmriskapp. Riskcode
And lmriskapp. Risktype7 in (' 1 '))
And not the exists
(select 1
The from lccont
Where prtno=lcpol. Prtno
And Appflag (in '0', '1', '2', '9')
And uwflag in (' 1 ', '2', 'a'))
The union
The select Amnt * GETDomesticRate Amnt (currency, ' '),
InsuredNo,
Riskcode,
Mult,
Cvalidate,
PayEndYear,
Insuyear,
PayIntv,
Polno,
Appflag,
Contno,
Prem * GETDomesticRate (LCPol currency, ' ') Prem,
LCPol. SumPrem * GETDomesticRate SumPrem LCPol. Currency, ' ',
DATE_FORMAT (LCPol Insuredbirthday, 'Y - m - % d % %) Birthday,
LCPol PayYears,
LCPol. Mainpolno
The from LCPol
Where InsuredNo='0000052605'
And LCPol. Appflag in (' 0 ', '1', '2', '9')
And (LCPol Uwflag & lt;> '1' and LCPol. Uwflag & lt;> '2' and
LCPol. Uwflag & lt;> 'a')
And not the exists
(SELECT 1
The FROM lmriskapp
WHERE LCPol. Riskcode=lmriskapp. Riskcode
And lmriskapp. Risktype7 in (' 1 '))
And not the exists
(select 1
The from lccont
Where prtno=lcpol. Prtno
And Appflag (in '0', '1', '2', '9')
And uwflag in (' 1 ', '2', 'a'))
The union
The SELECT LCPol. Amnt * GETDomesticRate Amnt LCPol. Currency, ' ',
LCPol InsuredNo,
LCPol Riskcode,
LCPol Mult,
LCPol Cvalidate,
LCPol PayEndYear,
LCPol insuyear,
LCPol PayIntv,
LCPol polno,
Lcpol appflag,
LCPol contno,
LCPol. Prem * GETDomesticRate (LCPol currency, ' ') Prem,
LCPol. SumPrem * GETDomesticRate SumPrem LCPol. Currency, ' ',
DATE_FORMAT (LCPol Insuredbirthday, 'Y - m - % d % %) Birthday,
LCPol PayYears,
LCPol. Mainpolno
The FROM lcpol, lmriskapp
WHERE lcpol. Riskcode=lmriskapp. Riskcode
And lcpol. Appntno='0000052605'
And lmriskapp. Risktype7 in (' 1 ')
And LCPol. Appflag in (' 0 ', '1', '2', '9')
And (LCPol Uwflag & lt;> '1' and LCPol. Uwflag & lt;> '2' and
LCPol. Uwflag & lt;> 'a')
And not the exists
(select 1
The from lccont
Where prtno=lcpol. Prtno
And Appflag (in '0', '1', '2', '9')
And uwflag in (' 1 ', '2', 'a'));
DECLARE the CONTINUE HANDLER FOR the NOT FOUND SET done=1;
The set tRiskAmnt=0;
The set t_temp_SumAmnt=0;
The set t_sql=' ';
The set t_ReceiveFlag=0;
The set t_Amnt=0;
The set t_Riskcode=0;
The set t_Mult=0;
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related