If Statement

From: "Greg Quinn" <greg(at)officium(dot)co(dot)za>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: If Statement
Date: 2007-02-04 18:15:33
Message-ID: 000701c74888$7f6472b0$6501a8c0@melt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

For some reason I cannot get an IF statement to work in PostGreSQL, even
though I am doing it in the format the manual tells me to...
Here is my query...

IF 1 = 1 THEN
update contacts set deleted = TRUE
END IF;

I get the error ERROR: syntax error at or near "IF" at character 1

I am using EMS's PostGreSQL Manager for windows.

Thanks

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message A. Kretschmer 2007-02-04 18:25:28 Re: If Statement
Previous Message Tom Lane 2007-02-04 17:56:13 Re: Accessing RECORD variable info