Subject Re: [firebird-support] Procedure compile error
Author Woody
From: "Mags Phangisa" <magutywa@...>
> Hi everyone,
>
> The following stored procedure won't compile successfully:
>
> CREATE PROCEDURE SPS_PYMT (SDT Date, EDT Date)
> RETURNS
> (MBR DATE, POL VARCHAR(20), PTY CHAR(4), BNK DATE, AMU DECIMAL(10,2), ERR
> CHAR(4))
> AS
> BEGIN
> FOR
> SELECT MBRID, POLNO, PTYPE, BNKDT, AMUNT, ERROR
> from PYMT where BNKDT>=:SDT and BNKDT<=:EDT
> INTO :MBR, :POL, :PTY, :BNK, :AMU, :ERR
> DO
> SUSPEND;
> END
>
> It brings up the following error:
> Unexpected end of command - line 11, column 3
>
> Line 11 is where SUSPEND is.
>
> I gather it is something small that brings up the error but I just can't
> find it. Pls assist.

Did you set the terminator to something other than semi-colon (;) first?

SET TERM ^;

CREATE PROCEDURE ...
...
END^

SET TERM ;^

Woody (TMW)