Create a Trigger for an existing View



Hi!


I created a view from the two existing tables (DEMO_USERS and
DEMO_ORDERS).

Code:
CREATE VIEW DEMO_MY_TEST AS
SELECT DEMO_USERS.USER_ID, DEMO_ORDERS.ORDER_ID
FROM DEMO_USERS
INNER JOIN DEMO_ORDERS
ON DEMO_ORDERS.USER_ID = DEMO_USERS.USER_ID

So now my job is to update my view if anybody will take an new order.
As example:
If user X with the USER_ID 2 will complete a new order my trigger must
updating the view.

But i have problems with the trigger, i know that i must write an
updating trigger, but the actuator for the trigger is an "insert into"
into the DEMO_ORDERS table, because only if a new order will insert
into the DEMO_ORDERS table, then the trigger must be activated and
updating the view.


Thanks a lot.

Dean Tomasevic

.



Relevant Pages

  • Re: Create a Trigger for an existing View
    ... INNER JOIN DEMO_ORDERS ... If user X with the USER_ID 2 will complete a new order my trigger must ... updating trigger, but the actuator for the trigger is an "insert into" ... I must insert the new entry of DEMO_ORDERS over a trigger into my new ...
    (comp.databases.oracle.server)
  • Re: Create a Trigger for an existing View
    ... INNER JOIN DEMO_ORDERS ... If user X with the USER_ID 2 will complete a new order my trigger must ... updating trigger, but the actuator for the trigger is an "insert into" ... is just a stored query, it doesn't immediately materialize and store ...
    (comp.databases.oracle.server)
  • Re: Create a Trigger for an existing View
    ... If user X with the USER_ID 2 will complete a new order my trigger must ... updating trigger, but the actuator for the trigger is an "insert into" ... is just a stored query, it doesn't immediately materialize and store ... I must insert the new entry of DEMO_ORDERS over a trigger into my new ...
    (comp.databases.oracle.server)
  • Re: SQL Update question
    ... replication going on in the ... may trigger unnecessary replication of the data and potentially cause ... updating a field unnecessarily may cause the trigger to fire. ...
    (microsoft.public.vb.general.discussion)
  • Re: Create a Trigger for an existing View
    ... INNER JOIN DEMO_ORDERS ... If user X with the USER_ID 2 will complete a new order my trigger must ... updating trigger, but the actuator for the trigger is an "insert into" ... I must insert the new entry of DEMO_ORDERS over a trigger into my new ...
    (comp.databases.oracle.server)