Created
March 29, 2014 12:34
-
-
Save roberto-filho/9853658 to your computer and use it in GitHub Desktop.
DML para corrigir as datas de lançamento dos lançamentos com data diferente da data da movimentação.
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
| update lancamentocontabil | |
| set datacadastro = lancamentocontabil.datalancamento, | |
| datalancamento = lcto.datamovimentacao::date | |
| from lancamentocontabil t1 | |
| join lancamentocontabil_lote lcto on lcto.id = t1.id | |
| where t1.datalancamento::date <> lcto.datamovimentacao::date | |
| and t1.empresa_id = 225 | |
| and lancamentocontabil.id = t1.id; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment