I may be wrong, but I believe you should not have a semicolon after beginning a loop
(in the for clause) and the IF NOT EXISTS clause should be different: you are probably
wanting FOUND which is a special variable so you will have to do the select first and
then check the FOUND variable afterw
leo <[EMAIL PROTECTED]> writes:
> CREATE FUNCTION editEmail(integer, smallint, varchar, varchar) RETURNS
> integer AS '
> ...
> -- if it wasn't, then insert the new record.
An undoubled quote mark in a function body is bad news...
regards, tom lan
Leo,
You're gonna feel like a dork when I point it out ...
> -- if the emailaddr was found, then update the record.
> -- if it wasn't, then insert the new record.
^^^ SINGLE QUOTE HERE!! BAD!
You can't have single quotes inside a function, especially in comments.
They will be trea
Hi all -
This might be the wrong forum for this, but I don't want to cross-post
unless someone tells me I should.
Anyways, I'm having a problem trying to compile this plpg proc. I'll post
the proc and the errors. I'm coming from a T-SQL background, so hopefully
when I get the hang of Pl/PgSQ