Subject | How to assign the result of SELECT to a variable in a procedure |
---|---|
Author | peter_nn0 |
Post date | 2005-12-02T13:57:39Z |
Hi,
I'm new to FB, hope someone can answer this probably stupid question:
In a stored procedure, I want is to assign the result of a SELECT
statement to a variable - but can't make it work. I try something like
return_var = select LNAME from WORKERS where WORKERS.ID
= :proc_parameter;
return_var is of the same type as LNAME - varchar(20)
The select statement itself is correct and works OK in other cases, and
is guaranteed to return 0 or 1 matches.
What's the correct way to do this?
Thanks
I'm new to FB, hope someone can answer this probably stupid question:
In a stored procedure, I want is to assign the result of a SELECT
statement to a variable - but can't make it work. I try something like
return_var = select LNAME from WORKERS where WORKERS.ID
= :proc_parameter;
return_var is of the same type as LNAME - varchar(20)
The select statement itself is correct and works OK in other cases, and
is guaranteed to return 0 or 1 matches.
What's the correct way to do this?
Thanks