Subject RE: [ib-support] stored procedure
Author Richard Pendered
See below:
but basically, when doing select into you need exactly the same number of
selected columns as you have 'into' variables.

Rich P...

-----Original Message-----
From: Regina Phandu [mailto:regina@...]
Sent: 28 September 2002 01:26
Subject: [ib-support] stored procedure

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;


/* HERE - do not use prod_code */
select prod_code, qty
from tm_pos_product
where prod_code = :prod_code
into :qty_display;

/* HERE same */
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]

To unsubscribe from this group, send an email to:

Your use of Yahoo! Groups is subject to