SHARE
TWEET

Untitled

a guest Aug 23rd, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT Count(T1.documento) AS 'apolices_a_renovar',
  2.         month(T1.termino_vigencia) as 'mes_vigencia',
  3.         year(T1.termino_vigencia) as 'ano_vigencia',
  4.         T2.divisao as 'divisao'
  5.         from tabela_documentos T1,
  6.         tabela_docsrepasses T2
  7.         where T1.termino_vigencia between '".$month."/01/".$year."' and '".$month."/31/".$year."'
  8.         and T1.alteracao = 0
  9.         and T1.situacao <> '2'
  10.         and T1.documento = T2.documento
  11.         and T1.alteracao = T2.alteracao
  12.         and T2.divisao = $idCOL      
  13.         group by T2.divisao, year(T1.termino_vigencia), month(T1.termino_vigencia)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top