if-clause to an exiting statement - Mailing list pgsql-general

From Kobi Biton
Subject if-clause to an exiting statement
Date
Msg-id 1291713593.2075.64.camel@kbiton-lap-ub
Whole thread Raw
Responses Re: if-clause to an exiting statement  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
Re: if-clause to an exiting statement  ("kobi.biton" <kobi@comns.co.il>)
List pgsql-general
hi i am a newbie to sql statments  , I am running postgres 8.1 with
application called opennms version 1.8.5 due to an application bug
queries that I execute aginst the DB which returns raw-count=0 are being
ignored and will not process a certain trigger I need to process.

My question is :  Can I use an if-clause into my statement (see below)
which will check if the returned raw-count =0 then will return
raw-count=1 ?
----------------------------------------------------------------------------------
SELECT a.eventuei AS _eventuei,
                 a.nodeid AS _nodeid,
                 a.ipaddr AS _ipaddr,
                 now() AS _ts
            FROM events a
                WHERE
a.eventuei='uei.opennms.org/comns/backup-success-trap' AND
                (eventcreatetime > now() - interval '10 minutes')
----------------------------------------------------------------------------------

Thanks!


pgsql-general by date:

Previous
From: Kalai R
Date:
Subject: Implement online database using Postgresql
Next
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: if-clause to an exiting statement