Hallo,
I would like to write the code to atrigger that makes insert into another table inly
if there is the condition
PREFERED_NUMBER = 1 and TELEPHONE_TYPE_ID in (1,2, 5)
How can write this in a simple way?
Thanks in advance.
Roland
--
Please see the official ORACLE-L FAQ:
On 01/30/2004 09:29:26 AM, [EMAIL PROTECTED] wrote:
Hallo,
I would like to write the code to atrigger that makes insert into
another table inly if there is the condition
Oracle9i Application Developer's Guide - Fundamentals, Ch. 15. - Using
Triggers. There are examples there, too.
--
Please see
Hallo everyone,
I have the table system_change
and I I have the insert statement here below be run when there is an update or insert
of a value in any ofthe fields
ORGANIZATION_NUMBER
LEGAL_NAME
COMPANY_FORM_ID
ORDER_STOP
in table COMPANY
insert into system_change
Enable auditing on COMPANY?
Regards, Carel-Jan
===
If you think education is expensive, try ignorance. (Derek Bok)
===
Hallo everyone,
I have the table system_change
and I I have the insert statement here below be run when there is an
update or insert of a value in any ofthe fields
Hallo,
I have the table system_change
and I I have the insert statement here below be run when there is an update or insert
of any of the fields
ORGANIZATION_NUMBER
LEGAL_NAME
COMPANY_FORM_ID
ORDER_STOP
in table COMPANY
The script bo be run is this one:
insert into system_change
The easiest way to write code for me is to use a text editor and sqlplus, always works
for me.
Raj
Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email are strictly personal.
QOTD: Any clod
: Trigger Question
:-
:-
:-Ok. Here you go.
:-
:-http://osi.oracle.com/~tkyte/Mutate/index.html
:-
:-Let me know if you find this useful.
:-
:-HTH
:-
:-GovindanK
:-OCP 8,8i
:-Brainbench Certified Master DBA(8)
:-
:-
:-On Thu, 08 Jan 2004 11:24:25 -0800, Nuala Cullen
:-[EMAIL PROTECTED]
:-said:
:-
:- Hi
I'm sure I will be corrected if I'm wrong.
Answers inline
At 12:24 PM 1/8/2004, you wrote:
Hi All,
Firstly my apologies if this seems like a very *stupid* question but I'm a
tad confused (and it's late in the evening)
When an AFTER INSERT trigger is fired (row level) has the row been committed
See in-line replies.
Mark J. Bobak
Oracle DBA
ProQuest Company
Ann Arbor, MI
Imagination was given to man to compensate him for what he is not, and
a sense of humor was provided to console him for what he is. --Unknown
-Original Message-
Nuala Cullen
Sent: Thursday, January 08,
Row has not been commited yet. The AFTER INSER trigger fires
after the row has been inserted. Rollback can still undo all
the changes performed by both insert and trigger. And no,
trigger cannot select from the table it is defined on, not
even through a procedure.
On 01/08/2004 02:24:25 PM,
Hi All,
Firstly my apologies if this seems like a very *stupid* question but I'm a
tad confused (and it's late in the evening)
When an AFTER INSERT trigger is fired (row level) has the row been committed
to the database at this stage?
If so is it ok to call a package in the trigger that
Wolfgang,
Yes you may, within the trigger only, change values of that row only. it's
known as
:new.column_name := whatever;
Dick Goulet
Senior Oracle DBA
Oracle Certified 8i DBA
-Original Message-
Sent: Thursday, January 08, 2004 2:39 PM
To: Multiple recipients of
You can do some funky stuff with Autonomous Transactions (trigger
independent from initiating transaction), but I need lots more coffee before
even attempting more detail on this.
Henry
-Original Message-
Mladen Gogala
Sent: Thursday, January 08, 2004 2:45 PM
To: Multiple recipients of
Of course. Silly me.
At 12:54 PM 1/8/2004, you wrote:
Wolfgang,
Yes you may, within the trigger only, change values of that row
only. it's known as
:new.column_name := whatever;
If so is it ok to call a package in the trigger that selects that row and
changes some values in
Ok. Here you go.
http://osi.oracle.com/~tkyte/Mutate/index.html
Let me know if you find this useful.
HTH
GovindanK
OCP 8,8i
Brainbench Certified Master DBA(8)
On Thu, 08 Jan 2004 11:24:25 -0800, Nuala Cullen [EMAIL PROTECTED]
said:
Hi All,
Firstly my apologies if this seems like a very
When an AFTER INSERT trigger is fired (row level) has the row been committed
to the database at this stage?
No
If so is it ok to call a package in the trigger that selects that row and
changes some values in the row?
No
See the following snippet from the fine SQL manual.
Jared
PS. Your
Dick, you cannot do that in an AFTER trigger.
Jared
On Thu, 2004-01-08 at 11:54, Goulet, Dick wrote:
Wolfgang,
Yes you may, within the trigger only, change values of that row only. it's
known as
:new.column_name := whatever;
Dick Goulet
Senior Oracle DBA
Oracle
Hallo,
What is wrong with this trigger:
I want the trigger to fire(to run the statement : UPPER(SUBSTR(:OLD.namn, 1, 1)) ||
SUBSTR(:OLD.namn,2);
after new record is inserted in this table.
The thing to happen should be this:
I want that script to be run on the same record that has been
As the this is a NEW record there is no OLD value!
(and would it be bette to use a BEFORE insert?)
Regards
torben
[EMAIL PROTECTED] writes:
Hallo,
What is wrong with this trigger:
I want the trigger to fire(to run the statement : UPPER(SUBSTR(:OLD.namn, 1, 1)) ||
SUBSTR(:OLD.namn,2);
Roland,
First thing would be that as it is an on insert trigger the OLD reference
is not valid (only valid for update and delete I think) though I'm surprised
that it accepts the referencing old as old part.
Iain Nicoll
-Original Message-
Sent: Wednesday, April 03, 2002 12:08 PM
To:
BDY.RTF
Description: RTF file
- Original Message -
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Sent: Wednesday, April 03, 2002 14:08
Hallo,
What is wrong with this trigger:
many things are wrong with this trigger, for example:
- the OLD pseudo column is defined only for UPDATE and DELETE
Hallo,
anyone who can please helpme with a trigger script that does the following:
I want this script to run when I have updated a field in a table.
update test set namn = upper(substr(namn,1,1) || substr(namn),2)
I want this trigger to fire only for the selected record(row), that is going
Title: RE: Trigger question
This should work:
CREATE TRIGGER BEFORE_ROWUPD_ON_TEST
BEFORE UPDATE OF namn
ON test
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
BEGIN
:NEW.namn := UPPER(SUBSTR(:OLD.namn, 1, 1) || SUBSTR(:OLD.namn), 2);
EXCEPTION
WHEN OTHERS
, OCPAISD512-414-1002[EMAIL PROTECTED]Sent by: [EMAIL PROTECTED]03/28/2002 03:33 AM PSTPlease respond to ORACLE-L To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] cc: bcc: Subject: Trigger question Hallo,anyone who can please helpme with a trigger script that does the following:I want
day, March 28, 2002 8:19
AM
Subject: Re: Trigger question
Oh my! (Is that gentle enough Jared?)
Roland,
I admire your ability to participate in this forum using the English
language, I certainly could not pose questions within a Swedish discussion
group. Since you have t
List,
I have some problem with Trigger, I want to Insert a record as Primary Key
on each insert into Table1 and the same time create another Primary key in
table2 plus PK from Tabl1 inserting in Table2 as Forign Key, Is there any
way to do all these steps in one trigger and assign this trigger
Hamid Alavi wrote:
List,
I have some problem with Trigger, I want to Insert a record as Primary Key
on each insert into Table1 and the same time create another Primary key in
table2 plus PK from Tabl1 inserting in Table2 as Forign Key, Is there any
way to do all these steps in one
recipients of
list ORACLE-L [EMAIL PROTECTED]
esoft.com cc:
Sent by:Subject: A Trigger question
[EMAIL PROTECTED]
08/22/01 08:56 AM
Please respond
THANKS A LOT FOR ALL WHO REPLIED !
-Original Message-
Sent: Wednesday, August 22, 2001 7:12 PM
To: Multiple recipients of list ORACLE-L
Yes. I was curious, so I did a little test:
Create 3 tables. Note the different datatypes.
SQL create table dbm_1
2 (a varchar2(5) not
Dear gurus !
sorry for this RTFMable question , just don't have the docs in front of me
here .
Assume i have a trigger my_trig that performs an insert into tableB after an
insert into tableA .
The question is : what happens if the trigger gets broken (either disabled ,
invalid or unable to do
Yes. I was curious, so I did a little test:
Create 3 tables. Note the different datatypes.
SQL create table dbm_1
2 (a varchar2(5) not null);
Table created.
SQL create table dbm_2
2 (a number not null);
Table created.
SQL create table dbm_3
2 (a varchar2(5) not
: A Trigger question
[EMAIL PROTECTED
33 matches
Mail list logo