Re: Stored procedure help
Posted in 1999
Bandaru Prasad wrote:
>
> Greeting All,
>
> I am very new to Informix and infact I am not a database champion. I
> have to right a small stored procedure in informix for a project that I
> am working on and I read through the help files and had the skeleton
> ready
> but could not execute it as I am getting a syntax which I am not able ti
> figure out. I wiam including the stored proedure below and was hoping to
> get some help from some one.
>
> Heres the small Stored Procedure
> ------------------------------------------------------------------------
> CREATE FUNCTION GetNextSeqNumber (tablename char(20))
Informix does not have "FUNCTION"s per se just proceedures, which like
PASCAL procedures can return values. Just make that:
CREATE PROCEDURE GetNextSeqNumber.....END PROCEDURE;
instead. Also each statement in the procedure must end in a semi-colon.
Art S. Kagel