Subject | RE: [ib-support] stored procedure |
---|---|
Author | Alan McDonald |
Post date | 2002-09-27T11:11:51Z |
:tot_prod_qty=(:qty_display + :qty_warehouse)
should work
but you need to exit fro the sp too
-----Original Message-----
From: Regina Phandu [mailto:regina@...]
Sent: Saturday, 28 September 2002 10:47
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] stored procedure
ic. i didn't realize it, my mistake :p
but still it's not working!
actually, can i do this:
:tot_prod_qty=(qty_display + qty_warehouse)
cause the error is in that line.
Regina Phandu
should work
but you need to exit fro the sp too
-----Original Message-----
From: Regina Phandu [mailto:regina@...]
Sent: Saturday, 28 September 2002 10:47
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] stored procedure
ic. i didn't realize it, my mistake :p
but still it's not working!
actually, can i do this:
:tot_prod_qty=(qty_display + qty_warehouse)
cause the error is in that line.
Regina Phandu
----- Original Message -----
From: "Richard Pendered" <rpendered@...>
To: <ib-support@yahoogroups.com>
Sent: Friday, September 27, 2002 3:39 AM
Subject: RE: [ib-support] stored procedure
> 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
> To: ib-support@yahoogroups.com
> 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)
> as
> declare variable qty_display float;
> declare variable qty_warehouse float;
>
> begin
>
> /* 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!
>
> Regina
>
>
> [Non-text portions of this message have been removed]
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>
>
Yahoo! Groups Sponsor
ADVERTISEMENT
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]