Skip to content
Permalink
Browse files

Create iqalert_checksqltrigger.sql

  • Loading branch information...
061375 committed Jul 25, 2019
1 parent 3ba0352 commit f7ba1d1c128c98f72e65211ef9e0ec30ff9c2e39
Showing with 22 additions and 0 deletions.
  1. +22 −0 iqalert_checksqltrigger.sql
@@ -0,0 +1,22 @@
/*
QUERY STRUCTURE BOOLEAN SHOULD IQALERT TAKE ACTION
USE NVL TO MAKE SURE IF A RESULT RETURNS NULL IT WILL DEFAULT TO 0
*/
SELECT NVL(
(

/*
QUERY HERE SHOULD RETURN 1 OR 0
*/

),0) FROM dual

/*
EXAMPLE TO DETERMINE IF ANY DOCUMENTS ARE CURRENTLY NOT RELEASED
*/
SELECT nvl(
(
SELECT CASE WHEN max(ID) is null THEN '0' ELSE '1' END Doc_not_released
FROM external_doc
WHERE status != 'Released'
),0) FROM dual

0 comments on commit f7ba1d1

Please sign in to comment.
You can’t perform that action at this time.