Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Update view problem

Re: Update view problem

From: Mr. Chow Wing Siu <wschow_at_Comp.HKBU.Edu.HK>
Date: 18 Nov 1999 23:38:04 GMT
Message-ID: <8122ks$jpr$1@power25t.hkbu.edu.hk>


rtproffitt_at_my-deja.com wrote:
> In my sample, I get an error message:
> update bobv set x='new' where x='old'
> *
> ERROR at line 1:
> ORA-01732: data manipulation operation not legal on this view
> Can you be more specific?

Yes. This is the correct error message which I get.

> Could you not just simply run two updates?

> Update t1_at_db1
> set x='new'
> where x='old';

> Update t1_at_db2
> set x='new'
> where x='old';

This is feasible but when I need to port to Visual Basic. How to specific two data source and field and update to two databases? That's why I need to find out the view to resolve my problem.

> Or if timing is a problem, then do one at a time....
> Create a list of the x's which are old,
> then LOOP through the list doing the two
> updates for each individual item in the list...
> doing a COMMIT every 1 - n rows (as you see fit).

> Also remember that your view is defined as UNION,
> which will sort and remove duplicates...you may want
> UNION ALL instead.

> Robert Proffitt
> Beckman Coulter
> Brea, California

Yes. It requires a COMMIT for each update (really necessary?).

Instead of updating to two databases for the same pair of data, the last resort is to:

	site 1				site 2
	Table A (view from site 2)	Table A
	Table B				Table B (view from site 2)

Updating any data requires a two phase commit. But I ask if one site (for example site 2) is down, can site 1 work normally? I mean update/insert/delete Table A at site 1.

Thanks for help.

--
Johnson Chow Received on Thu Nov 18 1999 - 17:38:04 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US