Home » Developer & Programmer » Forms » using two tables in views having problem in the froms
using two tables in views having problem in the froms [message #200767] Wed, 01 November 2006 04:36 Go to next message
shankar muthusamy
Messages: 21
Registered: November 2006
Location: singapore
Junior Member
Hi All,

I create a view with two tables, which is referred in the block of the froms, if i try to query the data it will populate the values but if i try to update the data it will not allow. But i need to update the data in front end.

Query is like

select a.col1 ,b.col3
from table1
, (select b.col1 ,v.col1 ,max(b.col3)
from table2 t ,view1 v
where v.col1 = t.col1) t2
where a.col2 = b.col2

which is in forms 10g.

Please help me to proceed further.


Regards
Shankar
Re: using two tables in views having problem in the froms [message #200787 is a reply to message #200767] Wed, 01 November 2006 05:52 Go to previous messageGo to next message
fakhar55
Messages: 99
Registered: September 2005
Location: UAE
Member
hi,
what is error message. Check for these...
1-R u updating a primary key column referenced by another table? 2-Entering duplicate values for a unique column.
3-Entering null value for a not null column.
Re: using two tables in views having problem in the froms [message #200901 is a reply to message #200787] Wed, 01 November 2006 16:47 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
You can only update a column that is marked 'updatable' in 'user_updatable_columns'. Search this forum for previous threads on this topic. Also read the Oracle Reference manual concerning when a view has a column which is or is not updatable. Basically, you can't use update through a view which does not contain the primary keys of both tables. Also, there must be a one-to-one relationship between the two tables - you use 'max' and a 'select' so I expect that there is not a one-to-one relationship. This means you will have to write your own code to do the updates or use a block based on a package that does the work.

David
Previous Topic: 'Please Acknowledge' after Pause (Suppress)
Next Topic: Urgent : Error : FRM-40654
Goto Forum:
  


Current Time: Fri Sep 20 11:32:33 CDT 2024