Created
February 11, 2014 23:02
-
-
Save roberto-filho/8946157 to your computer and use it in GitHub Desktop.
IMPORTANT UPDATE STATEMENT
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
| with x as ( | |
| select lancamentocontabil_lote.id id_lcto, | |
| get_planoconta_id(cta.id, ativo.empresa_id) conta_empresa_ativo | |
| from ativopermanente ativo | |
| join lancamentocontabil_lote on lancamentocontabil_lote.mov_id = ativo.injecaocreditoicms_id | |
| join planoconta cta on cta.id = lancamentocontabil_lote.conta_id) | |
| update lancamentocontabil lcto | |
| set conta_id = x.conta_empresa_ativo | |
| from x | |
| where lcto.id = x.id_lcto; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment