Sql updating a view

Posted by / 18-Jun-2020 11:06

Let suppose that someone has accidentally updated all esql Sales Person. How can we easily repopulate this data without having to retype it in?

Knowing that esql Sales Person was originally populated by information from Sales we use knowledge to set up a query that pumps data from v Sales Person into esql Sales Person.

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.

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.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.The lock is held in place until the update statement completes.Since this is an exclusive lock, not other transaction can modify data on this table, until the one which originally placed the lock is completed.

sql updating a view-85sql updating a view-83sql updating a view-60

The UPDATE statement is capable of updating more than one row. All rows returned via the WHERE clause criteria are updated.

One thought on “sql updating a view”