SQL Language (MOSC)

MOSC Banner

how to use sql to get the result as True or false based on count condition

edited Jun 2, 2017 7:08AM in SQL Language (MOSC) 18 commentsAnswered

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.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center