Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: declare variable in trigger

Re: declare variable in trigger

From: What's in a namespace <xml_at_ns.com>
Date: Fri, 22 Dec 2006 17:40:24 +0100
Message-ID: <458c0a69$0$322$e4fe514c@news.xs4all.nl>

<harun.bolat_at_netsim.net> schreef in bericht news:1166802666.166266.30290_at_48g2000cwx.googlegroups.com...
> Hi all,
>
> firstly sorry my english,
>
> how can I use variable if variable name same as table's field name?
>
> CREATE OR REPLACE TRIGGER KULLANIC_BI BEFORE INSERT ON KULLANIC
> FOR EACH ROW
> DECLARE
> NSUID INTEGER;
> BEGIN
> NSUID = 5;
> SELECT MAX(K.NSUID) AS F_1
> INTO NSUID
> FROM KULLANIC K
> WHERE K.NSUID = NSUID; /*this is my variable but oracle use this
> variable as a table field.*/
> END;
>
> is there any way use variable that name is same as field name?
>
>
> in InterBase
>
> SELECT MAX(K.NSUID)
> FROM KULLANIC K
> WHERE K.NSUID = :NSUID /* ':' this syntax uses to determine variable
> */
> INTO :NSUID
>
> any help will be appreciated?
>

Use a different name for your variable, why not?

Shakespeare
(what's in a name?) Received on Fri Dec 22 2006 - 10:40:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US