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! -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general