how to use sql to get the result as True or false based on count condition
Hello All,
Need help with modification of below sql:
select count(*) from (
SELECT b.dttmcreated,b.dttmlastupdated,source,pay_type,business_status,stage,status,b.applref,a.dttm_stage_status_changed,is_booked
FROM PIE.PaymentTrans a
INNER JOIN PIE.Message b on b.id = a.id
ORDER BY b.dttmcreated desc)
WHERE rownum < 2;
I am trying to setup monitoring in a way that -> If the result of the record count > 0 then ALERT=TRUE else FALSE.