Subject | Re: [ib-support] Beginner fiddeling with Stored Procedure |
---|---|
Author | GreatDayDan |
Post date | 2002-03-08T10:38:30Z |
Good Morning!
Put a colon (:) in front of the variable name (SET
SISTESENDNR = :NEWNUMBER).
HTH...Dan'l
--- Kai Bohli <kaiboe@...> wrote:
____________________________________
Every day is a Great day, but
some days are GREATER than others!
__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/
Put a colon (:) in front of the variable name (SET
SISTESENDNR = :NEWNUMBER).
HTH...Dan'l
--- Kai Bohli <kaiboe@...> wrote:
> Hi All=====
>
> I'm having trouble createing a sp with Firebird RC2,
> and wonder if anyone can help me spot the
> problem with my code. Here's the code:
>
> CREATE PROCEDURE GETSENDNUMBER
> RETURNS
> (
> EANSERIE VARCHAR(8),
> CURRENTNO INTEGER,
> MAXNR INTEGER
> )
> AS
> DECLARE VARIABLE NEWNUMBER INTEGER;
> BEGIN
> SELECT EANNR,SISTESENDNR, SERIETIL
> FROM POST_EANSEND
> WHERE ID = 1
> INTO :EANSERIE, :CURRENTNO, :MAXNR;
>
> NEWNUMBER = CURRENTNO + 1;
>
> IF (NEWNUMBER > MAXNR) THEN
> BEGIN
> EXCEPTION EANSENDSERIE_OPPBRUKT;
> SUSPEND;
> END
>
> UPDATE POST_EANSEND
> SET SISTESENDNR = NEWNUMBER // This is the
> offending line.
> WHERE ID = 1;
> SUSPEND;
>
> END
>
> The error message I'm getting is this: "Dynamic ...
> error code = -206 Column unknown NEWNUMBER At
> line 25, Column 21 (se my comment in the code for
> this line)
>
> TIA
>
> Best wishes
>
> Kai Bohli
> Norway
> kaiboe@...
>
____________________________________
Every day is a Great day, but
some days are GREATER than others!
__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/