Subject | Re: [ib-support] error in sp |
---|---|
Author | Regina Phandu |
Post date | 2002-10-11T10:55:43Z |
Helen,
I'm using IBConsole and IBAccess right now. But most of the time, I'm using
IBConsole. So, i don't need to commit that create exception, because it's
auto commit, right? that's why, i didn't put commit after create exception.
but, thanks for letting me know. I'll put it in my script.
i tested the procedure, and it gives me that error message.
well, i'm only using firebird for about 2 months actually.
i know SQL and PL/SQL, so i know the basic SQL language like, insert into
(table_name) values (..) and select statement, etc.
still need helps, though! :p
anyway, thanks a lot!
Regina Phandu
I'm using IBConsole and IBAccess right now. But most of the time, I'm using
IBConsole. So, i don't need to commit that create exception, because it's
auto commit, right? that's why, i didn't put commit after create exception.
but, thanks for letting me know. I'll put it in my script.
i tested the procedure, and it gives me that error message.
well, i'm only using firebird for about 2 months actually.
i know SQL and PL/SQL, so i know the basic SQL language like, insert into
(table_name) values (..) and select statement, etc.
still need helps, though! :p
anyway, thanks a lot!
Regina Phandu
----- Original Message -----
From: "Helen Borrie" <helebor@...>
To: <ib-support@yahoogroups.com>
Sent: Friday, October 11, 2002 3:36 AM
Subject: Re: [ib-support] error in sp
> At 05:30 PM 11-10-02 -0700, you wrote:
> >many thanks to helen and martijn!
> >so the procedure should be like this, right?
> >
> >create exception failed 'Procedure failed!';
> >
> >set term#;
> >create procedure sp_move_transaction
> >as
>
> ...
> ....except that the procedure won't compile if the CREATE EXCEPTION
> statement is not committed first.
>
> By the way, are you familiar with this DSQL syntax in Fb/IB?
>
> INSERT INTO tableb
> select <columnlist> from tablex
>
> heLen
>
>
> > declare variable v_t_seq_no integer;
> > declare variable v_t_no char(20);
> > declare variable v_t_date timestamp;
> > declare variable v_t_pos_code char(10);
> > declare variable v_t_shift integer;
> > declare variable v_t_cashier_id char(10);
> > declare variable v_t_cashier_name char(10);
> > declare variable v_t_product_name char(50);
> > declare variable v_t_prod_code integer;
> > declare variable v_t_qty float;
> > declare variable v_t_unit_price float;
> > declare variable v_t_amt float;
> > declare variable v_t_rounded_factor char(10);
> > declare variable v_t_tender_type integer;
> > declare variable v_flag integer;
> > declare variable v_usercreate char(10);
> > declare variable v_datecreate timestamp;
> >begin
> > select
>
>t_seq_no,t_no,t_date,t_pos_code,t_shift,t_cashier_id,t_cashier_name,t_produ
c
>
>t_name,t_prod_code,t_qty,t_unit_price,t_amt,t_rounded_factor,t_tender_type,
f
> >lag,usercreate,datecreate
> > from t_transaction
> > where t_date = current_date
> > into
>
>:v_t_seq_no,:v_t_no,:v_t_date,:v_t_pos_code,:v_t_shift,:v_t_cashier_id,:v_t
_
>
>cashier_name,:v_t_product_name,:v_t_prod_code,:v_t_qty,:v_t_unit_price,:v_t
_
>
>amt,:v_t_rounded_factor,:v_t_tender_type,:v_flag,:v_usercreate,:v_datecreat
e
> >;
> >
> > insert into th_transaction
>
>(t_seq_no,t_no,t_date,t_pos_code,t_shift,t_cashier_id,t_cashier_name,t_prod
u
>
>ct_name,t_prod_code,t_qty,t_unit_price,t_amt,t_rounded_factor,t_tender_type
,
> >flag,usercreate,datecreate)
> >
>
>values(:v_t_seq_no,:v_t_no,:v_t_date,:v_t_pos_code,:v_t_shift,:v_t_cashier_
i
>
>d,:v_t_cashier_name,:v_t_product_name,:v_t_prod_code,:v_t_qty,:v_t_unit_pri
c
>
>e,:v_t_amt,:v_t_rounded_factor,:v_t_tender_type,:v_flag,:v_usercreate,:v_da
t
> >ecreate);
> >
> > delete from t_transaction
> > where t_date = current_date;
> >
> > when any do exception failed;
> >
> >end#
> >set term;#
> >
> >thx!
> >Regina Phandu
> >
> >
> >
> >
> >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/
>
>
>