UPDATE AUTOFORNE
SET CDEMPRESA = '01'
WHERE CDEMPRESA IN  ('09','10')
/
DELETE ALIQUOTA
WHERE CDEMPRESA  IN ('09','10')
/
DELETE INCIDENCIA
WHERE CDEMPRESA  IN ('09','10')
/
UPDATE ITEMAUTF
SET CDEMPRESA = '01'
WHERE CDEMPRESA IN  ('09','10')
/
INSERT INTO INSCRESTAD
(CDEMPRESA,  CDINSCESTA, IDTPIJURIEST, NRINSJURIEST,  CDPAIS, SGESTADO, CDMUNICIPIO,  DSENDEIEST, NMBAIRIEST,  NRCEPIEST)
VALUES
('10','116813879114','J','04483679000682','0055','SP','7107',' ',' ',' ')
/
UPDATE NOTAFISCAL
SET CDINSCESTA = '116813879114'
WHERE CDINSCESTA = '116 813 879 114'
/
INSERT INTO INSCRMUNICIP
(CDEMPRESA, CDINSCMUNI,  NMREPRINSMUN)
VALUES
('10','3.567.513-6','SERGIO MORIMOTO')
/
UPDATE NOTAFISCAL
SET  CDINSCMUNI = '3.567.513-6'
WHERE  CDINSCMUNI = '35675136'
/
UPDATE NOTAFISCAL
SET CDEMPRESA = '01'
WHERE CDEMPRESA IN  ('09','10')
/
DELETE CONTOPECTBL
WHERE CDEMPRESA IN  ('09','10')
/
UPDATE FILIAL
SET CDINSCESTA = '116813879114'
WHERE CDINSCESTA = '116 813 879 114'
/
UPDATE FILIAL
SET  CDINSCMUNI = '3.567.513-6'
WHERE  CDINSCMUNI = '35675136'
/
UPDATE FILIAL
SET CDEMPRESA  = '01'
WHERE CDFILIAL IN ('1009','1010')
/
DELETE INSCRMUNICIP
WHERE CDEMPRESA IN  ('09','10')
/
DELETE INSCRESTAD
WHERE CDEMPRESA IN  ('09','10')
/
UPDATE CONTAPAGAR
SET CDCLASSFINA = '',
    DTMOVFLUXO  = '',
    IDMOVFLUXO  = ''
WHERE CDEMPRESA IN ('09','10')
/
UPDATE CONTAPAGAR
SET CDEMPRESA = '01'
WHERE CDEMPRESA IN ('10','09')
/
UPDATE BOLETPAGAR
SET CDEMPRESA = '01'
WHERE CDEMPRESA IN ('10','09')
/
DELETE MOVFLUXO
WHERE CDEMPRESA IN ('09','10')
/
DELETE LANCCONT
WHERE CDEMPRESA IN  ('09','10')
/
DELETE EMPRESA
WHERE CDEMPRESA IN  ('09','10')
/
COMMIT
/

