Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group