IBM Maximo: SQL Queries - tabela ESCSTATUS

From Wiki
Revision as of 15:08, 28 March 2022 by Ebasso (talk | contribs) (→‎Listar Escalações na tabela ESCSTATUS)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

SQL Queries

Listar Escalações na tabela ESCSTATUS

select escalation, count(1) as cnt
from ESCSTATUS 
group by escalation
order by 2 desc

Listar Escalações na tabela ESCSTATUS que não estão mais ativas

select e.escalation
from ESCALATION e
where e.active=0 
and e.escalation in (select es.escalation from ESCSTATUS es group by es.escalation)

Listar Escalações ÓRFÃS na tabela ESCSTATUS

select es.escalation
from ESCSTATUS es
where es.escalation not in ( select e.escalation from ESCALATION e)
group by es.escalation

Ver também