INSERT INTO sigesp_cmp (codemp, procede, comprobante, fecha, codban, ctaban, descripcion, tipo_comp, tipo_destino, cod_pro, ced_bene, total, numpolcon, esttrfcmp, estrenfon, codfuefin)
SELECT codemp, procede, comprobante, fecha, '002', '300-040451', descripcion, tipo_comp, tipo_destino, cod_pro, ced_bene, total, numpolcon, esttrfcmp, estrenfon, codfuefin
  FROM sigesp_cmp
 WHERE codemp = '0001'
   AND procede = 'SCBBCH'
   AND comprobante = '000000086086278'
   AND fecha = '2009-03-24'
   AND codban = '---'
   AND ctaban = '-------------------------';

UPDATE scg_dt_cmp 
   SET codban='002',ctaban='300-040451'
 WHERE codemp = '0001'
   AND procede = 'SCBBCH'
   AND comprobante = '000000086086278'
   AND fecha = '2009-03-24'
   AND codban = '---'
   AND ctaban = '-------------------------';

UPDATE spg_dt_cmp 
   SET codban='002',ctaban='300-040451'
 WHERE codemp = '0001'
   AND procede = 'SCBBCH'
   AND comprobante = '000000086086278'
   AND fecha = '2009-03-24'
   AND codban = '---'
   AND ctaban = '-------------------------';

DELETE FROM sigesp_cmp
 WHERE codemp = '0001'
   AND procede = 'SCBBCH'
   AND comprobante = '000000086086278'
   AND fecha = '2009-03-24'
   AND codban = '---'
   AND ctaban = '-------------------------';

