if-clause to an exiting statement
| От | Kobi Biton |
|---|---|
| Тема | if-clause to an exiting statement |
| Дата | |
| Msg-id | 1291713593.2075.64.camel@kbiton-lap-ub обсуждение исходный текст |
| Ответы |
Re: if-clause to an exiting statement
Re: if-clause to an exiting statement |
| Список | 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 по дате отправления: