oracle 转化数字异常,数字或错误:字符到数值的转换错误

请问这个存储过程什么地方写错了`???在测试时,报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||

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值