BEGIN TRAN
INSERT INTO CE_PRODUTOS_TRIB
(COD_EMP,
COD_PROD,
UF,
CFOP,
ALIQ_ICMS,
RED_BC_ICMS,
COD_FISCAL,
ST_PERC_MVA,
ST_ALIQ_ICMS_INTERNA,
IVA_ST,
ST_RED_BC_ICMS_INTERNA,
ALIQ_PIS,
ALIQ_COFINS,
CST_PIS,
CST_COFINS,
ALIQ_IPI,
CST_IPI,
COD_ENQUAD_IPI,
TRIB_LEI_TRANSP_NFE,
UNID_TRIB,
PROCODBAR_TRIB,
FATOR_QTD_TRIB,
MOD_BC_ICMS,
MOD_BC_ICMS_ST,
VLR_PAUTA_IPI,
ORIGEM_MERC,
PERC_DIFER_ICMS,
ALIQ_ICMS_INTERNA,
PERC_FCP,
ICMS_SEQ_IMPOSTO,
ICMS_CONTROLE_UP,
PIS_SEQ_IMPOSTO,
PIS_CONTROLE_UP,
COFINS_SEQ_IMPOSTO,
COFINS_CONTROLE_UP,
IPI_SEQ_IMPOSTO,
IPI_CONTROLE_UP,
VLR_PAUTA_ICMS_INTERNA,
VLR_PAUTA_ICMS_ST,
COD_CONTA_CONTABIL,
ALIQ_ICMS_EFETIVO,
RED_BC_ICMS_EFETIVO)
SELECT 
1, --COD_EMP,
COD_PROD, --COD_PROD,
'PR', --UF,
5101, --CFOP,
ALIQ_ICMS, --ALIQ_ICMS,
RED_BC_ICMS, --RED_BC_ICMS,
71, --COD_FISCAL,
52.97, --ST_PERC_MVA,
18, --ST_ALIQ_ICMS_INTERNA,
NULL, --IVA_ST,
NULL, --ST_RED_BC_ICMS_INTERNA,
1.65, --ALIQ_PIS,
7.6, --ALIQ_COFINS,
'01', --CST_PIS,
'01', --CST_COFINS,
15, --ALIQ_IPI,
'50', --CST_IPI,
NULL, --COD_ENQUAD_IPI,
NULL, --TRIB_LEI_TRANSP_NFE,
NULL, --VUNID_TRIB,
NULL, --PROCODBAR_TRIB,
NULL, --VFATOR_QTD_TRIB,
NULL, --MOD_BC_ICMS,
NULL, --MOD_BC_ICMS_ST,
NULL, --VLR_PAUTA_IPI,
NULL, --ORIGEM_MERC,
NULL, --PERC_DIFER_ICMS,
NULL, --ALIQ_ICMS_INTERNA,
NULL, --PERC_FCP,
NULL, --ICMS_SEQ_IMPOSTO,
NULL, --ICMS_CONTROLE_UP,
NULL, --PIS_SEQ_IMPOSTO,
NULL, --PIS_CONTROLE_UP,
NULL, --COFINS_SEQ_IMPOSTO,
NULL, --COFINS_CONTROLE_UP,
NULL, --IPI_SEQ_IMPOSTO,
NULL, --IPI_CONTROLE_UP,
NULL, --VLR_PAUTA_ICMS_INTERNA,
NULL, --VLR_PAUTA_ICMS_ST,
NULL, --COD_CONTA_CONTABIL,
NULL, --ALIQ_ICMS_EFETIVO,
NULL --RED_BC_ICMS_EFETIVO
FROM Mig_trib
WHERE CFOP = '5101/5401'
COMMIT

SELECT * FROM CE_PRODUTOS_TRIB
WHERE CFOP = 5101



SELECT * FROM Mig_trib
WHERE CFOP = '5101/5401'


