Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to update a view using "left join" when one of the base table is changed
yang wrote:
> I create a view in oracle like this:
>
> create or replace view view_muni_gc as SELECT TA.*,TB.ID3 AS TA_ID,
> TB.MUNI_NUM_ID FROM TA LEFT JOIN TB ON TA.MUNI_NUM_ID=TB.MUNI_NUM_ID
> WHERE TB.MUNI_NUM_ID IS NULL;
>
>
> the records is TB is a subset of those in TA, I want to use the view to
> show the records which are in TA but not in TB.
>
> When I insert a new record taking from TA into TB, the view is not
> updated. I still contains the same number of records before the
> insertion. I don't know where is the problem.
>
> Who can help me. Thanks!!!!:)
Please provide the DDL for the tables,
the view (again for those that can't find it)
and the insert statement.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Thu Apr 21 2005 - 01:04:41 CDT