因为要将行里头的数据逐条取出进行处理。
Code
1GO_BLOCK(Block_Name);
2FIRST_RECORD;
3LOOP
4 ..
5 ..
6 ..
7EXIT WHEN :SYSTEM.LAST_RECORD ='TRUE';--TRUE一定要大写!!!
8NEXT_RECORD;
9END LOOP;
10
11 begin
12 go_block('HEK_OM_POP_LINES_V');
13 first_record;
14 loop
15 if (:HEK_OM_POP_LINES_V.QUANTITY_2 IS NULL) then
16 copy(:HEK_OM_POP_LINES_V.QUANTITY_1, ':HEK_OM_POP_LINES_V.QUANTITY_2');
17 end if;
18
19 if :system.last_record = 'TRUE' then
20 exit;
21 end if;
22 next_record;
23 end loop;
24 end;
1GO_BLOCK(Block_Name);
2FIRST_RECORD;
3LOOP
4 ..
5 ..
6 ..
7EXIT WHEN :SYSTEM.LAST_RECORD ='TRUE';--TRUE一定要大写!!!
8NEXT_RECORD;
9END LOOP;
10
11 begin
12 go_block('HEK_OM_POP_LINES_V');
13 first_record;
14 loop
15 if (:HEK_OM_POP_LINES_V.QUANTITY_2 IS NULL) then
16 copy(:HEK_OM_POP_LINES_V.QUANTITY_1, ':HEK_OM_POP_LINES_V.QUANTITY_2');
17 end if;
18
19 if :system.last_record = 'TRUE' then
20 exit;
21 end if;
22 next_record;
23 end loop;
24 end;