Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: declare variable in trigger
harun.bolat_at_netsim.net wrote:
> 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? in firebird P/SQL syntax never change stored procedure or
> trigger.
> is there any solution or we have to change variable name?
Take a look at PL/SQL for dummies. It explains this very simply at the beginning about the scope of variable names - fieldnames override variable names and can lead to all sorts of confusion. Use the naming scheme in the book and you won't go wrong.
BTW, why are you migrating from Firebird? What is missing from it that you need in Oracle?
You might also want to post your question to the Firebird groups, where there will be more experience with porting to and from Firebird.
BTW, please do not top-post.
Paul...
-- plinehan __at__ yahoo __dot__ __com__ XP Pro, SP 2, Oracle, 10.2.0.1 (Express Edition) Interbase 6.0.2.0; When asking database related questions, please give other posters some clues, like operating system, version of db being used and DDL. The exact text and/or number of error messages is useful (!= "it didn't work!"). Thanks. Furthermore, as a courtesy to those who spend time analysing and attempting to help, please do not top post.Received on Sat Dec 23 2006 - 12:50:53 CST