SHARE
TWEET

Untitled

a guest Dec 9th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select trunc(createddate,'dd') timed,trunc(createddate,'hh24') timem,trunc(createddate,'mi') timest, 'created', GROUPID, HANDLERSCRIPT, ERRORDESCRIPTION, avg((lastupdateddate-createddate)*24*60), count(1) obs
  2. from eoc.ON_MOM_MESSAGES_ARCHIVE
  3. WHERE createddate > CAST (:sql_last_value AS date)
  4. group by trunc(createddate,'dd'),trunc(createddate,'hh24'),trunc(createddate,'mi'), GROUPID, HANDLERSCRIPT, ERRORDESCRIPTION
  5. union all
  6. select trunc(createddate,'dd') timed,trunc(createddate,'hh24') timem,trunc(createddate,'mi') timest, 'created', GROUPID, HANDLERSCRIPT, ERRORDESCRIPTION, avg((lastupdateddate-createddate)*24*60), count(1) obs  
  7. from  eoc.ON_MOM_MESSAGES
  8. WHERE createddate > CAST (:sql_last_value AS date)
  9. AND status = 3
  10. group by trunc(createddate,'dd'),trunc(createddate,'hh24'),trunc(createddate,'mi'), GROUPID, HANDLERSCRIPT, ERRORDESCRIPTION
  11. union all
  12. select trunc(lastupdateddate,'dd') timed,trunc(lastupdateddate,'hh24') timem,trunc(lastupdateddate,'mi') timest, 'finished',GROUPID, HANDLERSCRIPT, ERRORDESCRIPTION, avg((lastupdateddate-createddate)*24*60), count(1) obs from eoc.ON_MOM_MESSAGES_ARCHIVE
  13. WHERE createddate > CAST (:sql_last_value AS date)
  14. group by trunc(lastupdateddate,'dd'),trunc(lastupdateddate,'hh24'),trunc(lastupdateddate,'mi'), GROUPID, HANDLERSCRIPT, ERRORDESCRIPTION
  15. union all
  16. select trunc(lastupdateddate,'dd'),trunc(lastupdateddate,'hh24'),trunc(lastupdateddate,'mi') timest, 'finished_error', GROUPID, HANDLERSCRIPT, ERRORDESCRIPTION,avg((lastupdateddate-createddate)*24*60), count(1) obs  from  eoc.ON_MOM_MESSAGES
  17. where status = 3
  18. AND createddate > CAST (:sql_last_value AS date)
  19. group by trunc(lastupdateddate,'dd'),trunc(lastupdateddate,'hh24'),trunc(lastupdateddate,'mi'), GROUPID, HANDLERSCRIPT, ERRORDESCRIPTION
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