Re: updating tables from views

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 17 Sep 2001 06:02:49 -0700
Message-ID: <a20d28ee.0109170502.2cde790c_at_posting.google.com>


gmohata_at_yahoo.com (Girish Mohata) wrote in message news:<42a840c2.0109170040.2aa0a4db_at_posting.google.com>...
> Hi,
> I have created a view:
>
> Create View sturec as (
> Select sid,slname,grade,assessnumber
> from student,enrolment,assessment
> where student.sid=enrolment.sid
> and enrollment.cid=assessment.cid);
>
> Now when i insert a record into this view using SQL:
>
> insert into sturec values ....
>
> or using Oracle Forms 6.0,
>
> how can i effect the inserts into the base tables from the views
> (after authentication and validation ofcourse).
>
> Kind Regards,
> Girish

As the view is a join, you can only do this with on-insert/update/delete triggers in forms, and instead of triggers in Oracle 8i and beyond.
As you seem to think it isn't necessary to post the database version you are using I can't recommend one above the other, though the on-insert trigger of course works in Forms only.

Hth,

Sybrand Bakker, Senior Oracle DBA Received on Mon Sep 17 2001 - 15:02:49 CEST

Original text of this message