/*
  Sol: 11918 Patrick T. Sá 14/09/2015. Atualizar dados da tabela d
*/
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000202' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000202', 'Diferença de imposto apurada por contribuinte', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000206' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000206', 'Entrada de mercadoria com imposto a pagar ou utilização de serviços com imposto a pagar', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000207' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000207', 'Entrada de mercadoria, oriunda de outro Estado, destinada a uso, consumo ou integração no ativo imobilizado ou utilização de serviço iniciado fora do território paulista - Diferencial de alíquota.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000208' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000208', 'Complemento do imposto por contribuinte substituído - Complemento de Substituição Tributária.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000209' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000209', 'Ressarcimento de substituição tributária por Pedido de Liquidação de Débito Fiscal.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000210' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000210', 'Ressarcimento de substituição tributária por Nota Fiscal de Ressarcimento.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000211' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000211', 'Ressarcimento de substituição tributária por Pedido de Ressarcimento.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000212' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000212', 'Estabelecimento que receber de outro Estado, mercadoria abrangida pela substituição tributária, quando a responsabilidade pelo pagamento do imposto seja a ele atribuída - valor do imposto incidente sobre sua própria operação.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000213' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000213', 'Sujeito passivo por substituição que realizar operação fora do estabelecimento, sem destinatário certo, com mercadoria abrangida pela Substituição Tributária - ICMS próprio em remessa para venda fora do estabelecimento.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000214' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000214', 'Entrada de resíduo de materiais em estabelecimento industrial.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000215' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000215', 'Entrada de metais não-ferrosos  em estabelecimentos industriais. (Validade até a referência 08/2000).', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000216' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000216', 'Remessa para venda fora do estabelecimento.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000217' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000217', 'Diferença paga por empresa seguradora relativamente a peças adquiridas para emprego em conserto de veículo acidentado.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000218' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000218', 'Transferência de saldo credor  para estabelecimento centralizador.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000219' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000219', 'Recebimento de saldo devedor - estabelecimento centralizador.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000220' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000220', 'Devolução de crédito acumulado mediante autorização eletrônica.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000221' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000221', 'Apropriação de crédito acumulado mediante autorização eletrônica.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000222' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000222', 'Transferência de crédito acumulado – Protocolo ICM 12/84.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000223' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000223', 'Devolução de crédito recebido de Produtor Rural ou Cooperativa de Produtores Rurais mediante autorização eletrônica.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000224' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000224', 'Imposto devido na prestação de serviço de comunicação a usuário localizado neste Estado, na hipótese de inexistência de estabelecimento do prestador no território paulista.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000225' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000225', 'Transferência de Crédito Simples do ICMS, decorrente da entrada de bem destinado ao ativo permanente.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000226' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000226', 'Transferência de crédito do ICMS para cooperativa centralizadora de vendas.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP000299' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP000299', 'OUTRAS HIPÓTESES - PREENCHIDA PELO CONTRIBUINTE.', 00, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP010301' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP010301', 'Estorno de imposto creditado quando a mercadoria entrada no estabelecimento vier a perecer, deteriorar-se ou for objeto de roubo, furto ou extravio.', 01, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP010302' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP010302', 'Estorno de imposto creditado quando o serviço tomado ou a mercadoria adquirida for objeto de saída ou prestação de serviço não tributada.', 01, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP010303' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP010303', 'Estorno de imposto creditado quando a mercadoria adquirida for integrada ou consumida em processo de industrialização ou produção rural, quando a saída não for tributada ou estiver isenta do imposto.', 01, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP010304' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP010304', 'Estorno de imposto creditado quando a mercadoria adquirida for integrada ou consumida em processo de industrialização ou produção rural, quando a saída tiver base de cálculo reduzida.', 01, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP010305' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP010305', 'Estorno do valor do crédito deduzido na guia de recolhimento nas saídas de café cru, em coco ou em grão.', 01, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP010306' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP010306', 'Estorno do valor do crédito deduzido na guia de recolhimento nas saídas de gado em pé bovino e suíno.', 01, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP010307' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP010307', 'Ativo Permanente - transferência de crédito  remanescente.', 01, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP010308' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP010308', 'Saídas de produtos agrícolas - ICMS recolhido pelo armazém geral, por guia de recolhimentos especiais.', 01, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP010309' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP010309', 'Uso ou consumo da mercadoria ou serviço destinado à comercialização ou Industrialização.', 01, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP010310' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP010310', 'Estorno do imposto creditado na ocorrência 007.08.', 01, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP010399' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP010399', 'OUTRAS HIPÓTESES - PREENCHIDA PELO CONTRIBUINTE.', 01, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020708' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020708', 'Importação de bem ou mercadoria com direito a crédito de ICMS.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020709' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020709', 'Crédito outorgado sobre o imposto devido na prestação de serviço de transporte, exceto aéreo.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020710' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020710', 'Imposto pago indevidamente, em virtude de erro de fato ocorrido na escrituração dos livros fiscais ou no preparo da guia de recolhimento.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020711' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020711', 'Imposto correspondente à diferença verificada entre a importância recolhida e a apurada decorrente do desenquadramento do regime de estimativa.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020712' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020712', 'Imposto pago indevidamente, objeto de pedido administrativo de restituição quando a decisão não tiver sido proferida no prazo de 45 dias, contados da data do respectivo pedido.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020713' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020713', 'Imposto pago indevidamente em razão de destaque a maior em documento fiscal, até o limite estabelecido pela Secretaria da Fazenda.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020714' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020714', 'Valor do imposto destacado na nota fiscal relativa à aquisição de bem, objeto de arrendamento mercantil  pela empresa arrendadora, por ocasião da entrada no estabelecimento.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020716' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020716', 'Imposto recolhido por guia de recolhimentos  especiais nas saídas de álcool carburante e  de produtos resultantes da industrialização do petróleo.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020717' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020717', 'Imposto recolhido pelo destinatário por guia de recolhimentos especiais, relativo a serviço tomado ou mercadoria entrada no estabelecimento.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020718' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020718', 'Entrada de mercadoria, oriunda de outro Estado, destinada a uso, consumo ou integração no ativo imobilizado, ou utilização de serviço iniciado noutro Estado - Diferencial de alíquota.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020719' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020719', 'Ressarcimento de substituição tributária, por estabelecimento de contribuinte substituído.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020720' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020720', 'Compensação de imposto pago na operação própria do substituto, por estabelecimento de contribuinte substituído, relativamente a operações com veículos.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020721' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020721', 'Crédito relativo à operação própria do Substituto  em operação interestadual promovida pelo  contribuinte substituído.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020722' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020722', 'Imposto recolhido mediante guia de recolhimentos especiais nas operações com café cru.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020723' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020723', 'Imposto recolhido por guia de recolhimentos especiais pelo abate de gado.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020724' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020724', 'Crédito outorgado – abate de bovinos e suínos.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020725' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020725', 'Imposto recolhido mediante guia de recolhimentos especiais nas operações com gado em pé.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020726' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020726', 'Imposto relativo à entrada de gado em pé originário de outro Estado.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020727' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020727', 'Recolhimento em outros Estados nas operações de vendas fora do estabelecimento.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020728' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020728', 'Na desistência de ressarcimento por Nota Fiscal de Ressarcimento, Pedido de Ressarcimento ou Pedido de Liquidação de Débito Fiscal - Reincorporação do imposto.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020729' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020729', 'Transferência de saldo devedor para estabelecimento centralizador.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020730' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020730', 'Recebimento de saldo credor – estabelecimento centralizador.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020731' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020731', 'Crédito outorgado – abate de aves.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020732' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020732', 'Crédito outorgado – outros produtos alimentícios.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020733' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020733', 'Crédito outorgado – informática periférico.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020734' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020734', 'Crédito outorgado – telefone celular.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020735' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020735', 'Crédito outorgado – unidade de processamento.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020736' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020736', 'Crédito outorgado –  informática outros.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020737' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020737', 'Crédito outorgado - leite esterilizado UHT (longa vida).', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020738' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020738', 'Crédito outorgado – adesivo hidroxilado - garrafas PET.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020739' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020739', 'Valor destinado ao Programa de Ação Cultural - PAC.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020740' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020740', 'Recebimento de crédito acumulado mediante autorização eletrônica.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020741' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020741', 'Reincorporação de crédito acumulado mediante autorização eletrônica.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020742' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020742', 'Valor destinado ao Programa de Incentivo ao Esporte - PIE.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020743' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020743', 'Recebimento de Crédito Acumulado – Protocolo ICM 12/84.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020744' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020744', 'Recebimento de crédito de estabelecimento de Produtor Rural ou de estabelecimento de Cooperativas de Produtores Rurais mediante autorização eletrônica.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020745' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020745', 'Incorporação de Crédito por estabelecimento de Cooperativas de Produtores Rurais mediante autorização eletrônica.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020746' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020746', 'Crédito oriundo de serviço de comunicação utilizado na prestação de serviço de mesma natureza a usuário localizado neste Estado, na hipótese de inexistência de estabelecimento do prestador no território paulista.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020747' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020747', 'Recebimento de Crédito Simples do ICMS, a que se refere o Decreto 56.133/2010.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020748' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020748', 'Recebimento de crédito do ICMS de estabelecimento fabricante de açúcar ou etanol.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP020799' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP020799', 'OUTRAS HIPÓTESES - PREENCHIDA PELO CONTRIBUINTE.', 02, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP030801' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP030801', 'Devolução de mercadoria oriunda de outro Estado, destinada a uso, consumo ou integração no ativo imobilizado, ou de utilização de serviço iniciado em outro Estado.', 03, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP030802' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP030802', 'Regularização de documentos fiscais em virtude de diferença no preço, em operação ou prestação, ou na quantidade de mercadoria, quando a regularização se efetuar após o período de apuração.', 03, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP030803' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP030803', 'Lançamento do imposto, não efetuado em época própria, em virtude de erro de cálculo ou de classificação fiscal, ou outro, quando a regularização se efetuar após o período de apuração.', 03, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP030804' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP030804', 'Imposto relativo à operações realizadas pelo sujeito passivo por substituição fora do estabelecimento com mercadoria abrangida pela substituição tributária - Estorno do ICMS próprio no retorno - venda fora do estabelecimento.', 03, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP030805' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP030805', 'Operações com café cru: imposto a ser recolhido em período posterior.', 03, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP030806' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP030806', 'Imposto destacado em Nota Fiscal de remessa para venda fora do estabelecimento.', 03, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP030899' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP030899', 'OUTRAS HIPÓTESES - PREENCHIDA PELO CONTRIBUINTE.', 03, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP041499' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP041499', 'Deduções – RPA – ST – RES.', 04, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP100201' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP100201', 'Imposto retido em remessa para venda fora do estabelecimento.', 10, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP100202' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP100202', 'ICMS retido nas vendas efetuadas a revendedores ambulantes para revenda no sistema porta-a-porta para consumidores finais.', 10, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP100299' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP100299', 'OUTRAS HIPÓTESES - PREENCHIDA PELO CONTRIBUINTE.', 10, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP110399' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP110399', 'OUTRAS HIPÓTESES - PREENCHIDA PELO CONTRIBUINTE.', 11, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP120701' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP120701', 'Ressarcimento de imposto retido por nota fiscal', 12, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP120702' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP120702', 'Dedução de imposto retido – ressarcimento por depósito bancário.', 12, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP120703' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP120703', 'Ressarcimento relativo a operações interestaduais com combustíveis.', 12, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP120704' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP120704', 'Repasse a outras unidades federadas relativo a operações interestaduais com combustíveis.', 12, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP120799' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP120799', 'OUTRAS HIPÓTESES - PREENCHIDA PELO CONTRIBUINTE.', 12, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP130801' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP130801', 'Estorno de imposto retido no retorno – venda fora do estabelecimento.', 13, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP130899' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP130899', 'OUTRAS HIPÓTESES - PREENCHIDA PELO CONTRIBUINTE.', 13, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP141499' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP141499', 'Deduções – RPA – ST – RES.', 14, '01/01/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI, BDDATAFIM) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP009999' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP009999', 'Outros débitos para ajuste de apuração ICMS.', 00, '01/01/2009', '03/31/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI, BDDATAFIM) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP109999' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP109999', 'Outros débitos para ajuste de apuração ICMS ST.', 10, '01/01/2009', '03/31/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI, BDDATAFIM) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP019999' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP019999', 'Estorno de créditos para ajuste de apuração ICMS.', 01, '01/01/2009', '03/31/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI, BDDATAFIM) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP119999' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP119999', 'Estorno de créditos para ajuste de apuração ICMS ST.', 11, '01/01/2009', '03/31/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI, BDDATAFIM) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP029999' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP029999', 'Outros créditos para ajuste de apuração ICMS.', 02, '01/01/2009', '03/31/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI, BDDATAFIM) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP129999' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP129999', 'Outros créditos para ajuste de apuração ICMS ST.', 12, '01/01/2009', '03/31/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI, BDDATAFIM) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP039999' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP039999', 'Estorno de débitos para ajuste de apuração ICMS.', 03, '01/01/2009', '03/31/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI, BDDATAFIM) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP139999' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP139999', 'Estorno de débitos para ajuste de apuração ICMS ST.', 13, '01/01/2009', '03/31/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI, BDDATAFIM) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP049999' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP049999', 'Deduções do imposto apurado na apuração ICMS.', 04, '01/01/2009', '03/31/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI, BDDATAFIM) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP149999' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP149999', 'Deduções do imposto apurado na apuração ICMS ST.', 14, '01/01/2009', '03/31/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI, BDDATAFIM) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP059999' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP059999', 'Débito especial de ICMS .', 05, '01/01/2009', '03/31/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI, BDDATAFIM) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP159999' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP159999', 'Débito especial de ICMS ST.', 15, '01/01/2009', '03/31/2015') MATCHING(BDCODAJUICMSST);
UPDATE OR INSERT INTO VEF_BASE_TTABAJUICMSST(BDCODAJUICMSST, BDCODUF, BDCODAJUST, BDDESCAJU, BDPREFIXOCODAJU, BDDATAINI, BDDATAFIM) VALUES((SELECT FIRST 1 COALESCE(BDCOD, BDCODMAX) AS BDCOD FROM (SELECT bdcodajuicmsst AS BDCOD, NULL BDCODMAX FROM VEF_BASE_TTABAJUICMSST WHERE bdcodajust = 'SP099999' UNION ALL SELECT NULL BDCOD, MAX(bdcodajuicmsst)+1 AS BDCODMAX FROM VEF_BASE_TTABAJUICMSST)), 26, 'SP099999', 'Controle do ICMS extra-apuração .', 09, '01/01/2013', '03/31/2015') MATCHING(BDCODAJUICMSST);

COMMIT WORK;