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