1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| DECLARE
cursor AlimTableFait is
SELECT c.CDE_NUM,c.OP_NUM ,sfdd_str.getfield(C.CDE_COMP1,';',34,1) as DateCachetPostale,o.op_da_deb, o.op_da_fin,sfdd_str.getfield(C.CDE_COMP1,';',4,1)as DATE_ACHAT_OU_TC_OU_BDC ,
o.op_da_bloc_rec ,o.op_da_bloc_rec+3,ch.CKLV_DA_REA,c.CDE_DA_ETA
FROM o_operation@sfdd o,o_commande@sfdd c , O_CHECK_LIST_VAL@sfdd ch
where c.op_num=o.op_num and ch.op_num=o.op_num and ch.op_num=c.op_num and
o.tie_num_cli= '000051' ;
M AlimTableFait%ROWTYPE;
BEGIN
OPEN AlimTableFait ;
loop
fetch AlimTableFait into M ;
insert into table_fait_activite_globale values (M.OP_NUM,M.DateCachetPostale, M.op_da_deb,M.op_da_fin,M.DATE_ACHAT_OU_TC_OU_BDC,M.op_da_bloc_rec ,
M.op_da_bloc_rec+3,M.CKLV_DA_REA,M.CDE_DA_ETA,M.CDE_NUM);
EXIT WHEN AlimTableFait%NOTFOUND;
end loop;
end; |
Partager