请问这个存储过程什么地方写错了`???在测试时,报PL/SQL:数字或错误:字符到数值的转换错误,在CISDEV.SENSITIVEPHONE,LINE13 在LINE3
create or replace procedure Sensitivephone
(managerunitid In out number,
Mincode in out varchar2,
Maxcode In out varchar2,
Contactofficephone In out varchar2,
sensitiveexplain In out varchar2,
displayvalue In out varchar,
operatorname in out varchar2,
cur_result_out Out sys_refcursor) as
str_sql Varchar2(200);
Begin
If managerunitid is Not Null Then
managerunitid:='and a.managerunitid=' ;
ElsIf Mincode is Not Null Then
Mincode := 'and a.customercode between ';
ElsIf Maxcode is Not Null Then
Maxcode := 'and ';
ElsIf Contactofficephone is Not Null Then
Contactofficephone := 'and a.Contactofficephone=';
ElsIf sensitiveexplain is Not Null Then
sensitiveexplain := 'and a.sensitiveexplain=';
ElsIf displayvalue is not null then
displayvalue:='and syssen.displayvalue=';
elsif operatorname is not null then
operatorname :='and d2.operatorname=';
str_sql := 'select
ROW_NUMBER() over (order by a.customerid) as rid,a.customercode,a.Contactofficephone
,a.SensitiveExplain,syssen.displayvalue,d2.operatorname,a.ModifyDate,d1.operatorname,a.InputDate
from t_mc_customer a
left join t_mc_customermodifyrecord b on b.customerid=a.customerid
left join t_sec_manageunit c on c.unitcode=a.managerunitid
inner join T_SEC_OPERATOR d1 on d1.operatorid=a.inputoperatorid
left join T_SEC_OPERATOR d2 on d2.operatorid=a.ModifiedByID
left join (select * from s_msa_syscode where paracode=''SensitiveType'') syssen on syssen.storevalue=a.SensitiveTypeID
where 1=1 ' ||managerunitid||