Re: HELP - TRIGGERS !?! (Post msg)

From: <rzx2122_at_mcvax2.d48.lilly.com>
Date: 13 Oct 93 15:59:41 EST
Message-ID: <1993Oct13.155941.1_at_mcvax2.d48.lilly.com>


jcrupi_at_mystech.mystech.com (John Crupi) writes:
>
>I am unable to create a trigger in sql/plus.
>
>Can someone please give me the syntax
>on creating a trigger which INSERTS a value
>into a COLUMN of a newly created RECORD.
>
>By the way I want to insert a SEQUENCE.nextval
>into the COLUMN.

In a block level PRE-INSERT trigger, select the NEXTVAL into your database field. The problem with this, you won't see the value until the record is posted or committed.

SELECT SEQNAME.NEXTVAL
INTO :BLOCKNAME.FIELDNAME
FROM DUAL;


                                            chicago ,--------+  detroit
Tom Harleman                                        |        |
INOUG Committee Member                              |Indiana |
Paradigm Consulting, Inc.                 st.       | Oracle |
11080 Willowmere Drive                    louis     |  Users |
Indianapolis, IN  46280                             |   Group|
USA                                                 |        |
                                                    |      _,+cincinnati
INTERNET:   72072.2122_at_compuserve.com               /   _,'
Compuserve: 72072,2122                             /_,-'louisville
                                                   `
EXECUTE_TRIGGER('DISCLAIMER');
Received on Wed Oct 13 1993 - 21:59:41 CET

Original text of this message