daily pastebin goal
46%
SHARE
TWEET

Consulta Estgiários

delrick-oliveira Feb 19th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.  
  3.     Nome AS "NOME",
  4.     Funcional->CargoEfetivo->Descricao AS "CARGO",
  5.     Funcional->DataIngOrgaoFormatada AS "DT. ING.",
  6.         Financeiro->DataDesligamento AS "DESLIG",
  7.         Funcional->TipoServidor->descricao,
  8.         DATEDIFF(YEAR, PESSOA->datanascimento, CAST((:p1 || '-12-31') AS DATE )) AS "IDADE P.REF",
  9.     COUNT('QTD') AS "QTD"
  10.  
  11. FROM RHCadServidor
  12.  
  13. WHERE
  14.     ( Funcional->TipoServidor->Codigo IN (10))
  15.     AND ( Funcional->DataIngOrgao <= CAST((:p1 || '-12-31') AS DATE ))
  16.     AND (
  17.             ( Financeiro->DataDesligamento IS NULL )
  18.             OR
  19.             ( Financeiro->DataDesligamento > CAST((:p1 || '-12-31') AS DATE )))
  20.         AND (FUNCIONAL->LOTACAOEXERCICIO->CODIGO NOT IN (200360,200373,200378,200386,200387, 200388, 200359))
  21.  
  22.  
  23. ORDER BY
  24.     FUNCIONAL->TIPOSERVIDOR->DESCRICAO,
  25.     Nome
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
 
Top