Subject Re: [ib-support] stored procedure
Author Regina Phandu
ok, i realize i did some mistakes, but right now it said that table
tm_pos_product is unknown.
I did create that table in my database. don't know why the error said that
the table is unknown!

set term !!;
create procedure sp_tot_prod_qty (prod_code integer)
returns (tot_prod_qty float)
as
declare variable qty_display float;
declare variable qty_warehouse float;
begin
select qty
from tm_pos_product
where prod_code = :prod_code
into :qty_display;

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

tot_prod_qty=(qty_display + qty_warehouse);

end !!


Regina