Created
March 28, 2014 21:07
-
-
Save roberto-filho/9843010 to your computer and use it in GitHub Desktop.
SQL para corrigir a data dos lançamentos conforme a 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 = l1.datalancamento, | |
| datalancamento = l2.datamovimentacao | |
| from lancamentocontabil l1 | |
| join lancamentocontabil_lote l2 on l2.id = l1.id | |
| where lancamentocontabil.id = l1.id | |
| and l1.empresa_id = 225 | |
| and l1.datacadastro is null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment