Solved

Oracle merge/update into view?

Posted on 2008-10-23
1
767 Views
Last Modified: 2013-12-18
If I have a view such as the following would there be any difference between using merge/update statements on the Products and the view MyProducts?
CREATE VIEW MyProducts
AS
SELECT * FROM Products, ProductCat
WHERE Product.ID = ProductCat.ProdID
AND ProductCat.Account = 1

Open in new window

0
Comment
Question by:evotsi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 74

Accepted Solution

by:
sdstuber earned 500 total points
ID: 22789842
yes, depending on which columns, if any, are constrained to be unique, the view may not be updateable.


plus, the view acts as a filter.  If a product does not have a corresponding row in the productcat table with account = 1 then that product won't show up in the view, so you won't be able to apply updates to it but you could against the base table
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question