This discussion is archived
1 2 Previous Next 16 Replies Latest reply: Feb 22, 2013 6:48 PM by 972355 Go to original post RSS
  • 15. Re: FORCE option in VIEWS
    rp0428 Guru
    Currently Being Moderated
    If you want anyone to follow what you are doing you need to STOP switching to different code than what you posted before.

    This is what you just posted - it uses 'v4' and emp, dept and payroll tables (and who knows what the structure of 'payroll' is or if the structure of emp and dept are the default)
    >
    MY VIEW SOURCE

    SQL>create view v4 as
    select e.eid, e.ename, e.edob, e.egender, e.equal ,
    d.dname, d.dmanager ,
    p.esalary, p.egrade , p.ebonus
    from emp e , dept d , payroll p
    where e.eid=d.eid and d.eid=p.eid with CHECK OPTION;

    View created.

    SQL> insert into v4 values(1016 ,'chaya','150687','female','mba'
    ,'hr','sandy','2000','e','2000');
    2 insert into v4 values(1016 ,'chaya','150687','female','mba'
    *
    ERROR at line 1:
    ORA-01779: cannot modify a column which maps to a non key-preserved table
    >
    But I was responding to what you posted before - this uses 'v3' and 'v2' so ask what the structure of 'v2' was
    >
    SQL>create or replace view v3
    2 as
    3 select * from v2
    4 with check option;

    View created.

    SQL> insert into v3 values(1016 ,'chaya','150687','female','mba'
    2 ,'hr','sandy','2000','e','2000');

    insert into v3 values(1016 ,'chaya','150687','female','mba'
    *
    >
    And you respond by posting new code that uses new objects and at least one of them 'payroll' is not defined.

    All that does is lead people down a bunny trail and I'm getting tired of the hike.
  • 16. Re: FORCE option in VIEWS
    972355 Newbie
    Currently Being Moderated
    * I was getting too much confusions when facing errors *

    When i tried to change few things ( view source) dropped ..

    " I'm getting tired of the hike. "

    - I am very sorry rp ..

    + Once again , i will work on this .. I hope to get better result ..+

    Thanks for kind support .. and sorry for posting incomplete thread ..
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points