Last active
November 1, 2018 19:45
-
-
Save felipefinhane/66ab828c2f63fe4ce47f501d1aa74acb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TRUNCATE AccountingBalanceSheetLayoutEnvironment; | |
INSERT INTO AccountingBalanceSheetLayoutEnvironment(id_balanco_contabil_layout, id_empresa) SELECT | |
id_balanco_contabil_layout , | |
c.id_empresa | |
FROM | |
AccountingBalanceSheetLayoutMainData a | |
LEFT JOIN CorporationMainData c ON c.stat <> 0; | |
TRUNCATE AccountingBalanceSheetLayoutProfile; | |
INSERT INTO AccountingBalanceSheetLayoutProfile(id_balanco_contabil_layout , id_perfil) SELECT | |
id_balanco_contabil_layout , | |
id_perfil | |
FROM | |
AccountingBalanceSheetLayoutMainData a | |
LEFT JOIN ProfileMainData p ON p.stat <> 0 | |
WHERE p.id_perfil IN (117,114, 146,62 ,120 ,98); | |
-- CONTABIL | |
-- (117,114, 146,62 ,120 ,98) | |
TRUNCATE AccountEnvironment; | |
INSERT INTO AccountEnvironment(id_conta_contabil, id_empresa) SELECT | |
id_conta_contabil , | |
c.id_empresa | |
FROM | |
AccountMainData a | |
LEFT JOIN CorporationMainData c ON c.stat <> 0; | |
TRUNCATE AccountProfile; | |
INSERT INTO AccountProfile(id_conta_contabil , id_perfil) SELECT | |
id_conta_contabil , | |
id_perfil | |
FROM | |
AccountMainData a | |
LEFT JOIN ProfileMainData p ON p.stat <> 0 | |
WHERE p.id_perfil IN (117,114, 146,62 ,120 ,98); | |
######################################################################################################################## | |
TRUNCATE AccountingTransactionDescriptionEnvironment; | |
INSERT INTO AccountingTransactionDescriptionEnvironment (id_descricao_transacao_contabil, id_empresa) SELECT | |
id_descricao_transacao_contabil , | |
c.id_empresa | |
FROM | |
AccountingTransactionDescriptionMainData a | |
LEFT JOIN CorporationMainData c ON c.stat <> 0; | |
TRUNCATE AccountingTransactionDescriptionProfile; | |
INSERT INTO AccountingTransactionDescriptionProfile (id_descricao_transacao_contabil , id_perfil) SELECT | |
id_descricao_transacao_contabil , | |
id_perfil | |
FROM | |
AccountingTransactionDescriptionMainData a | |
LEFT JOIN ProfileMainData p ON p.stat <> 0 | |
WHERE p.id_perfil IN (117,114, 146,62 ,120 ,98); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment