Updating a view in oracle

How can you update a view column that is generated through a combination of multiple base columns? And how can it update either or both in a way that will behave correctly after the update, given that the expression for the virtual column always includes a space?

The ACTOR_FULLNAME column in the view is a concatenation of two base columns and a literal. If you have some meaningful logic you want to implement to handle such an UPDATE, you could use an INSTEAD OF trigger on the view to implement it.

Whenever I have to reboot my modem [sic] at home, I typically get a new IP address from my ISP.

updating a view in oracle-12

CREATE OR REPLACE VIEW Film Details View (Film_Name, Actor_Full Name, Hall_Number, Date_Time) AS SELECT flm.film_name, actor.actor_name || ' ' || actor.actor_surname, hall.cinemahall_number, schedule.schedule_date FROM film flm JOIN movieschedule schedule ON (flm.film_id = schedule.schedule_filmid) JOIN cinemahall hall ON (schedule.schedule_hallid = hall.cinemahall_id) JOIN Film Actor filmactor ON (flm.film_id = filmactor.filmactor_filmid) JOIN Actor actor ON (actor.actor_id = filmactor.filmactor_actorid); Error starting at line 312 in command: UPDATE FILMDETAILSVIEW SET ACTOR_FULLNAME = 'a' WHERE HALL_NUMBER = 1 Error at Command Line:313 Column:4 Error report: SQL Error: ORA-01733: virtual column not allowed here 01733.

00000 - "virtual column not allowed here" *Cause: *Action: A view is just a stored query -- when you update through it, it's the underlying tables that must be modified.

Oracle has no way of knowing what you mean by updating that column. Your view contains a virtual column Actor_Full Name, which is a concatenation of two other real columns.

You can only update views that meet certain criteria, or have an associated INSTEAD OF trigger. You are trying to update a view like you would a table.

That is not possible--you need to instead change the definition of the view.

From the Oracle 10g SQL Reference: Notes on Updatable Views An updatable view is one you can use to insert, update, or delete base table rows.

What matters is if you have a unique index for your "lookup" [email protected] This is a different problem entirely.

You need to take a look at your view and see what parts of it can be updated. feed_year='13-14'; I used this query but its giving me "F"."AP_NUMBER": invalid identifier error. feedback with column APP_NO&MEMBER_IDI want update feed_year column of feedback table by joining feedback table with appointmenton column APP_NO=AP_APP_NO and MEMBER_ID = ap.

You may wish to update records in one table based on values in another table.

Since you can't list more than one table in the Oracle UPDATE statement, you can use the Oracle EXISTS clause.

The inner select does result in 53 rows, and the table being updated DOES have a primary key. No knowing your table structure, my first guess would be that Party.objectid does not have unique constraint on it.

Tags: , ,