/***************************
   a01.{my_fld} 
***************************/
insert into t01
(nr01, p01, p02, p03, p04, p06, p07, p09, 
remdate, remtime, remuser, remfdate, remftime, remfuser )
select peg_new_nr01('t01', 1) as nr01, 
       p21 as p01, 
       '{odbcdtos(my_date)}' as p02, 
       if({my_fld}>0, {my_fld}, 0) as p03, 
       if({my_fld}<0, abs({my_fld}), 0) as p04, 
       'Από μεταφορά' as p06, 
       if({my_fld}>0, {my_kkxr}, {my_kkpi}) as p07, 
       {my_store} as p09, 
       
       curdate() as remdate, 
       curtime() as remtime, 
       '{user_pswd}' as remuser, 
       curdate() as remfdate, 
       curtime() as remftime, 
       '{user_pswd}' as remfuser 
       
from a01
where {my_fld}<>0;
/*peg_end*/