SQL> declare
2 v_count number := 0;
3 begin
4 for i in (select tl.amount,
5 '积分到期清零1230',
6 tl.accountnumber,
7 sysdate,
8 case
9 when tl.amount >= tl.bmount then
10 -tl.bmount
11 else
12 -tl.amount
13 end,
14 seq_jfql_transactionlog.nextval,
15 case
16 when tl.amount >= tl.bmount then
17 tl.amount - tl.bmount
18 else
19 0
20 end,
21 0,
22 -1,
23 2,
24 0,
25 0,
26 0,
27 '积分到期清零1230',
28 1,
29 null,
30 null,
31 0,
32 null
33 from t_jfql_log1231 tl) loop
34 insert into t_transactionlog_bak values i;
35 v_count := v_count + 1;
36
37 if mod(v_count, 20000) = 0 then
38 commit;
39 end if;
40
41 end loop;
42 commit;
43 end;
44 /
for i in (select tl.amount,
*
第 4 行出现错误:
ORA-06550: 第 4 行, 第 3 列:
PLS-00402: 要求在游标的 SELECT 列表中具有别名, 以避免列名重复
ORA-06550: 第 4 行, 第 3 列:
PL/SQL: Statement ignored
=============================
请问各位老师,是本身写的就有问题么