Easy: you've got 3 Ifs without "END IF":
IF uppergt = 'BOD' THEN RETURN 0 ;
IF uppergt = 'MOD' THEN RETURN 86400/2 ;
IF uppergt = 'EOD' THEN RETURN 86399 ;
Igor
-Original Message-
From: Ralph Smith [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2008 3:19 PM
To: pgsql-general@
Yes, that was it.
The other QUITE similar language I've used didn't require the END IF
if it was a one-liner.
You can bet I won't forget that one again - or longer than it takes to
goof up and rediscover it!
Thanks!
Ralph
On Jun 19, 2008, at 12:4
I think that the IF clauses need END IF.
IF uppergt = 'BOD' THEN RETURN 0; END IF;
IF uppergt = 'MOD' THEN RETURN 86400/2; END IF;
IF uppergt = 'EOD' THEN RETURN 86399; END IF;
This should solve the problem.
Philippe Gregoire
Information Manager
www.boreal-is.com
Ralph Smith wrote:
I'm b
And the semi-colon should be removed after the END
Philippe
Philippe wrote:
I think that the IF clauses need END IF.
IF uppergt = 'BOD' THEN RETURN 0; END IF;
IF uppergt = 'MOD' THEN RETURN 86400/2; END IF;
IF uppergt = 'EOD' THEN RETURN 86399; END IF;
This should solve the problem.
Phili
I'm baffled and have tried various variations but still nogo.
From PgAdmin III I get:
---
** Error **
ERROR: syntax error at or near ";"
SQL state: 42601
Character: 19001
-- referring to the semi-colon after the 'END' statement.