insert into t41
(nr01, p01, p02, p03, p04, p05, p06, p07,
remdate, remtime, remuser, remfdate, remftime, remfuser)

select z_tameia_t41.nr01 as nr01, 
       z_tameia_t41.p01 as p01, 
       z_tameia_t41.p02 as p02, 
       z_tameia_t41.p03 as p03, 
       z_tameia_t41.p04 as p04, 
       z_tameia_t41.p05 as p05, 
       z_tameia_t41.p06 as p06, 
       z_tameia_t41.p07 as p07, 

       curdate() as remdate, 
       curtime() as remtime, 
       z_tameia_t41.remuser as remuser, 
       z_tameia_t41.remfdate as remfdate, 
       z_tameia_t41.remftime as remftime, 
       z_tameia_t41.remfuser as remfuser 

from z_tameia_t41
LEFT JOIN t41 ON t41.p01=z_tameia_t41.p01
WHERE t41.nr01 is null;
/*peg_end*/
