Advertisement
paulogp

Nº comprovativos solicitados para facturas sem recepção

Jul 25th, 2011
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.26 KB | None | 0 0
  1. -- paulogp
  2. -- localhost
  3. -- indicador Kaizen
  4. SELECT COUNT(*) AS VALOR_APURADO
  5. FROM q_documento_associacao_ag
  6. WHERE (assoc_type = '1030300')
  7.  AND (assoc_date BETWEEN DATEADD(mm, DATEDIFF(mm, 0, GETDATE()) - 1, 0)
  8.  AND DATEADD(mm, DATEDIFF(mm, 0, GETDATE()), 0))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement