存储过程报错,添加的sql语句单独查询时 没有报错
createorreplaceprocedureAA(MATCHIDINVARCHAR2)asbeginINSERTINTOL_APPLICATIONBILL_ITEM_...
create or replace procedure AA(MATCHID IN VARCHAR2)
as
begin
INSERT INTO L_APPLICATIONBILL_ITEM_T
(MATCHID,
VALIDFLAG,
CARNO,
ICID,
RFIDID,
OPERATYPE,
CARTYPE,
SOURCECODE,
SOURCENAME,
TARGETCODE,
TARGETNAME,
OPERATYPE,
USERMEMO,
SYSMEMO,
CREATEDATE,
VALIDFLAGOPERANAME,
VALIDFLAGTIME) values
(select MATCHID||to_char(lpad(seq1.nextval, 1, '0')),
VALIDFLAG,
CARNO,
ICID,
RFIDID,
OPERATYPE,
CARTYPE,
SOURCECODE,
SOURCENAME,
TARGETCODE,
TARGETNAME,
OPERATYPE,
USERMEMO,
SYSMEMO,
CREATEDATE,
VALIDFLAGOPERANAME,
VALIDFLAGTIME
from m_measure_t
/*where MATCHID = MATCHID*/);
insert into L_APPLICATIONBILL_T
(MATCHID,
VALIDFLAG,
CARNO,
ICID,
RFIDID,
OPERATYPE,
CARTYPE,
SOURCECODE,
SOURCENAME,
TARGETCODE,
TARGETNAME,
USERMEMO,
SYSMEMO,
CREATEDATE,
VALIDFLAGOPERANAME,
VALIDFLAGTIME) values
(select OPERATYPE || to_char('00') || to_char(sysdate, 'yyMMdd') ||
lpad(to_char(seq1.nextval), 5, '0'),
VALIDFLAG,
CARNO,
ICID,
RFIDID,
OPERATYPE,
CARTYPE,
SOURCECODE,
SOURCENAME,
TARGETCODE,
TARGETNAME,
USERMEMO,
SYSMEMO,
CREATEDATE,
VALIDFLAGOPERANAME,
VALIDFLAGTIME from m_measure_t
);
end; 展开
as
begin
INSERT INTO L_APPLICATIONBILL_ITEM_T
(MATCHID,
VALIDFLAG,
CARNO,
ICID,
RFIDID,
OPERATYPE,
CARTYPE,
SOURCECODE,
SOURCENAME,
TARGETCODE,
TARGETNAME,
OPERATYPE,
USERMEMO,
SYSMEMO,
CREATEDATE,
VALIDFLAGOPERANAME,
VALIDFLAGTIME) values
(select MATCHID||to_char(lpad(seq1.nextval, 1, '0')),
VALIDFLAG,
CARNO,
ICID,
RFIDID,
OPERATYPE,
CARTYPE,
SOURCECODE,
SOURCENAME,
TARGETCODE,
TARGETNAME,
OPERATYPE,
USERMEMO,
SYSMEMO,
CREATEDATE,
VALIDFLAGOPERANAME,
VALIDFLAGTIME
from m_measure_t
/*where MATCHID = MATCHID*/);
insert into L_APPLICATIONBILL_T
(MATCHID,
VALIDFLAG,
CARNO,
ICID,
RFIDID,
OPERATYPE,
CARTYPE,
SOURCECODE,
SOURCENAME,
TARGETCODE,
TARGETNAME,
USERMEMO,
SYSMEMO,
CREATEDATE,
VALIDFLAGOPERANAME,
VALIDFLAGTIME) values
(select OPERATYPE || to_char('00') || to_char(sysdate, 'yyMMdd') ||
lpad(to_char(seq1.nextval), 5, '0'),
VALIDFLAG,
CARNO,
ICID,
RFIDID,
OPERATYPE,
CARTYPE,
SOURCECODE,
SOURCENAME,
TARGETCODE,
TARGETNAME,
USERMEMO,
SYSMEMO,
CREATEDATE,
VALIDFLAGOPERANAME,
VALIDFLAGTIME from m_measure_t
);
end; 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询