Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

View, instead of trigger and ORA-01031

HeinzSep 19 2007 — edited Sep 26 2007

Hello,

I have a view based on outer joins like

CREATE VIEW vt ( colV1, colV2, colV3, colV4, colV5, colV6, colV7, colV8 ) AS
SELECT A.colA1, A.colA2, C.colB0, B.colB2, B.colB3, B.colB4, C.colC2, H.colH2
  FROM  tabA    A
       ,tabB    B
       ,tabC    C
       ,( SELECT  ...
            FROM   tabD  D
                  ,tabE  E
            WHERE  D.colD1 = E.colE1
         )  H                                 
  WHERE A.colA1 = B.colB1
    AND LTRIM(B.colB2,'A') = LTRIM(C.colC1(+),'A')     
    AND B.colB3 = H.colH1(+);

and an instead of trigger

CREATE OR REPLACE TRIGGER vt_upd
  INSTEAD OF UPDATE ON vt
BEGIN
  UPDATE    tabB
     SET    colB4 = :NEW.colV6
     WHERE  colB0 = :NEW.colV2;
END;

An now the problem: an update statement

UPDATE vt set colV6=1 WHERE colV1=1;

in SQL*Plus works as it should, but performing an update in APEX from a tabular or edit form shows an error:

ORA-01031:ORA-01031: insufficient privileges, update...

The strange thing: in both sessions there is the same user USER1 logged on !

Why this difference ? Can anybody explain ?

Regards,
Heinz

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 24 2007
Added on Sep 19 2007
25 comments
3,189 views