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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Triggers and Sequences

Re: Triggers and Sequences

From: <prochak_at_my-dejanews.com>
Date: Thu, 05 Nov 1998 19:22:56 GMT
Message-ID: <71stug$2b7$1@nnrp1.dejanews.com>


In article <71mfb4$7qu$1_at_news01.btx.dtag.de>,   Woidl32_at_hotmail.com wrote:
> Hi all,
>
> that's a simple one, I'm sure.
>
> How do I set a value for a column in a trigger using a sequence?
>
> I only get "invalid trigger" messages, when I try doing it. Guess it's a
> matter of syntax.
>
> Any (quick) help highly appreciated.
>
> Heinz
>

First off, you can't, trigger don't have columns,  only tables have columns ;^)

but seriously, if you think it is syntax, try posting a sample of the code that shows the problem. Else all I can suggest is you do it like any other PL/SQL program:

 select seq_name into :new.col_name from dual;

Wait is this a BEFORE INSERT or an AFTER INSERT trigger? maybe this error occurs for AFTER INSERT triggers? What's the error number?

--
Ed Prochak
Magic Interface, Ltd.
440-498-3702

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Nov 05 1998 - 13:22:56 CST

Original text of this message

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