Subject stored procedure
Author Regina Phandu
Hi all,

I'm trying this procedure, but i get an error. I'm new with firebird.
hope anyone would help me here!

set term !!;
create procedure sp_tot_prod_qty (prod_code integer)
returns (tot_prod_qty float)
declare variable qty_display float;
declare variable qty_warehouse float;


select prod_code, qty
from tm_pos_product
where prod_code = :prod_code
into :qty_display;

select prod_code, qty
from tm_warehouse
where prod_code = :prod_code
into :qty_warehouse;

:tot_prod_qty=(qty_display + qty_warehouse)

end !!
set term ;!!

thanks in advance!


[Non-text portions of this message have been removed]