Last active
March 7, 2017 13:44
-
-
Save suspecie/6b9dd15b6ad5ea4a04780351622dcc18 to your computer and use it in GitHub Desktop.
This file contains 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
INSERT INTO Tag | |
( | |
id_tabela_sistema_tabela_sistema_tag, | |
id_registro_tabela_sistema_aplicacao, | |
id_registro_tabela_sistema_tag | |
) | |
SELECT | |
stst.id_tabela_sistema_id_tabela_sistema_tag, | |
act.id_transacao_contabil, | |
act.id_parceiro_principal | |
FROM | |
SystemTableSystemTableTag stst | |
LEFT JOIN AccountingTransaction act ON act.id_parceiro_principal is not null | |
WHERE | |
stst.id_tabela_sistema_aplicacao = 1071 | |
AND stst.id_tabela_sistema_tag = 1303 | |
AND stst.ordem = 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment