Subject | Re: [firebird-support] SP Creation |
---|---|
Author | Helen Borrie |
Post date | 2004-11-07T00:10:35Z |
Lee,
At 01:33 PM 6/11/2004 -0500, Lee Jenkins wrote:
The thing is, CUSTOMERPASS isn't a variable. If it wasn't finding a column
in the SELECT specification, you would have seen a different exception.
./heLen
At 01:33 PM 6/11/2004 -0500, Lee Jenkins wrote:
> I am having a bit of trouble with my currentINTO :v_CustomerPass;
>SP. I keep getting a "Variable CUSTOMERPASS unknown". If I compile anyway,
>it goes through and subsequent changes to the SP do not produce that error.
>I am using IBExpert personal so I wan to see if its something with it or my
>lack of understanding. Also this is the first time I've used a Dialect 3
>database, but do not quote out anything in DDL statements.
>
>SET TERM ^;
>CREATE PROCEDURE SP_VALIDATECUSTOMER (
> IP_CUSTOMERID INTEGER,
> IP_CUSTOMERPASS VARCHAR(35))
>RETURNS (
> OP_VALIDATED INTEGER)
>AS
>DECLARE VARIABLE V_CUSTOMERPASS VARCHAR(35);
>begin
> SELECT CUSTOMERPASS /* <=== Here is offending portion */ FROM Customers
>WHERE CustomerID = :IP_CustomerID
> /* INTO v_CustomerPass; */
> IF (:IP_CustomerPass = :v_CustomerPass) ThenAre you sure it wasn't saying "Variable V_CUSTOMERPASS unknown" ?
> OP_Validated = 1;
> Else
> OP_Validated = 0;
> suspend;
>end
>^
>SET TERM ; ^
The thing is, CUSTOMERPASS isn't a variable. If it wasn't finding a column
in the SELECT specification, you would have seen a different exception.
./heLen