Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: declare variable in trigger
thanks,
we already tested block label, but not worked.
I think there is no solution. we have to change variable name.
thanks a lot.
hasta_l3_at_hotmail.com yazdı:
> harun.bolat_at_netsim.net a écrit :
> > we use firebird database and try to migrate project to oracle. All our
> > database object( trigger, stored procedure) we use variable name same
> > as database field name and we have no problem. using variable same as
> > field name, makes code more readable.
> > to migrate oracle from firebird we try to write convert program that
> > takes firebird sql and produce oracle sql code.
> >
> > In oracle stored procedure we can use variable name same as field name
> > like procedure_name.variable_name syntax. This syntax why not exists it
> > trigger?
>
> Perhaps block labels will help you - something
> like this little crazie :
>
> CREATE OR REPLACE TRIGGER KULLANIC_BI BEFORE INSERT ON KULLANIC
> FOR EACH ROW
> BEGIN
> <<KULLANIC_BI>>
> DECLARE
> NSUID INTEGER;
> BEGIN
> NSUID := 5;
> SELECT MAX(K.NSUID) AS F_1
> INTO NSUID
> FROM KULLANIC K
> WHERE K.NSUID = KULLANIC_BI.NSUID;
> END;
> END;
>
> Best regards
>
> --- Raoul
Received on Mon Dec 25 2006 - 01:32:12 CST