我在sql window执行下面的语句:
insert into TDAPSBILLSECTION(CLS, NUM, FSECTION)
select distinct CLS, NUM ,FSECTION
from TDAPSBILLART
where cls = '123' and Num = '456'
order by fsection;
不报错,
但是把
insert into TDAPSBILLSECTION(CLS, NUM, FSECTION)
select distinct CLS, NUM ,FSECTION
from TDAPSBILLART
where cls = piCls and Num = r.Num
order by fsection;
放到一个函数的游标里执行的时候,就会报错(PLS-00103),哪位知道这是怎么回事啊?
insert into TDAPSBILLSECTION(CLS, NUM, FSECTION)
select distinct CLS, NUM ,FSECTION
from TDAPSBILLART
where cls = '123' and Num = '456'
order by fsection;
不报错,
但是把
insert into TDAPSBILLSECTION(CLS, NUM, FSECTION)
select distinct CLS, NUM ,FSECTION
from TDAPSBILLART
where cls = piCls and Num = r.Num
order by fsection;
放到一个函数的游标里执行的时候,就会报错(PLS-00103),哪位知道这是怎么回事啊?
为for Update状态.
解决办法有去掉Order by 子句或者对Order by的字段进行索引.