Skip to content

Instantly share code, notes, and snippets.

@roberto-filho
Created March 28, 2014 21:07
Show Gist options
  • Select an option

  • Save roberto-filho/9843010 to your computer and use it in GitHub Desktop.

Select an option

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.
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