dbTalk Databases Forums  

help!ORA-01445: cannot select ROWID from a join view without a key-preserved table

comp.databases.oracle comp.databases.oracle


Discuss help!ORA-01445: cannot select ROWID from a join view without a key-preserved table in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
tracy
 
Posts: n/a

Default help!ORA-01445: cannot select ROWID from a join view without a key-preserved table - 07-05-2004 , 09:49 PM






when i run the statement:
SQL> select rowid from student_semester;
ERROR at line 1:
ORA-01445: cannot select ROWID from a join view without a
key-preserved table

student_semester is a view with the sql :
CREATE OR REPLACE VIEW "ICEM_USER"."STUDENT_SEMESTER" ("STUD_ID",
"SEMESTER_STATUS_ID","SEMESTER_STATUS_YEAR",
"SEMESTER_STATUS_SEMESTER","SEMESTER_STATUS_PROGRA M",
"SEMESTER_STATUS_BRANCH","SEMESTER_STATUS_DESC ") AS
select
STUD_ID ,
SEMESTER_STATUS_ID ,
SEMESTER_STATUS_YEAR ,
SEMESTER_STATUS_SEMESTER ,
SEMESTER_STATUS_PROGRAM ,
SEMESTER_STATUS_BRANCH ,
SEMESTER_STATUS_DESC
from student_profile, semester_status
where stud_program = SEMESTER_STATUS_PROGRAM


Now, my users can't run query from a forms, which contains this
tables. Before yesterday, they able to do this.

Pls tell me what;s wrong and how to fix it.


TQ!

regards,
Tracy

Reply With Quote
  #2  
Old   
Dario
 
Posts: n/a

Default Re: help!ORA-01445: cannot select ROWID from a join view without a key-preserved table - 07-06-2004 , 08:30 AM






tracykim10 (AT) yahoo (DOT) com.hk (tracy) wrote in message news:<5c91cce9.0407051849.688cd6fa (AT) posting (DOT) google.com>...
Quote:
when i run the statement:
SQL> select rowid from student_semester;
ERROR at line 1:
ORA-01445: cannot select ROWID from a join view without a
key-preserved table

student_semester is a view with the sql :
CREATE OR REPLACE VIEW "ICEM_USER"."STUDENT_SEMESTER" ("STUD_ID",
"SEMESTER_STATUS_ID","SEMESTER_STATUS_YEAR",
"SEMESTER_STATUS_SEMESTER","SEMESTER_STATUS_PROGRA M",
"SEMESTER_STATUS_BRANCH","SEMESTER_STATUS_DESC ") AS
select
STUD_ID ,
SEMESTER_STATUS_ID ,
SEMESTER_STATUS_YEAR ,
SEMESTER_STATUS_SEMESTER ,
SEMESTER_STATUS_PROGRAM ,
SEMESTER_STATUS_BRANCH ,
SEMESTER_STATUS_DESC
from student_profile, semester_status
where stud_program = SEMESTER_STATUS_PROGRAM


Now, my users can't run query from a forms, which contains this
tables. Before yesterday, they able to do this.

Pls tell me what;s wrong and how to fix it.


TQ!

regards,
Tracy
Tracy,

My guess is that your view has been changed (or underlying tables),
your view is not updateable anymore. Post here full ddl for tables,
including pk constraints.


Reply With Quote
  #3  
Old   
Mark D Powell
 
Posts: n/a

Default Re: help!ORA-01445: cannot select ROWID from a join view without a key-preserved table - 07-06-2004 , 10:04 AM



tracykim10 (AT) yahoo (DOT) com.hk (tracy) wrote in message news:<5c91cce9.0407051849.688cd6fa (AT) posting (DOT) google.com>...
Quote:
when i run the statement:
SQL> select rowid from student_semester;
ERROR at line 1:
ORA-01445: cannot select ROWID from a join view without a
key-preserved table

student_semester is a view with the sql :
CREATE OR REPLACE VIEW "ICEM_USER"."STUDENT_SEMESTER" ("STUD_ID",
"SEMESTER_STATUS_ID","SEMESTER_STATUS_YEAR",
"SEMESTER_STATUS_SEMESTER","SEMESTER_STATUS_PROGRA M",
"SEMESTER_STATUS_BRANCH","SEMESTER_STATUS_DESC ") AS
select
STUD_ID ,
SEMESTER_STATUS_ID ,
SEMESTER_STATUS_YEAR ,
SEMESTER_STATUS_SEMESTER ,
SEMESTER_STATUS_PROGRAM ,
SEMESTER_STATUS_BRANCH ,
SEMESTER_STATUS_DESC
from student_profile, semester_status
where stud_program = SEMESTER_STATUS_PROGRAM


Now, my users can't run query from a forms, which contains this
tables. Before yesterday, they able to do this.

Pls tell me what;s wrong and how to fix it.


TQ!

regards,
Tracy
Tracy, what chaged between today and the day before yesterday when the
above query worked? Was Forms upgraded? Were either of the two
tables in the view modified? Was the view code replaced? Was index
maintenance ran on either of the base tables resulting in losing a PK
or UK definition?

Find what changed to find the cause of the problem.
HTH -- Mark D Powell --


Reply With Quote
  #4  
Old   
kaapie
 
Posts: n/a

Default Re: help!ORA-01445: cannot select ROWID from a join view without a key-preserved table - 07-12-2004 , 10:55 PM



Oracle does not know which table's rowid to return from this view and
thus it gives an error.

What this means is that one of the underlying tables in the view has
to have either a primary key or a unique index that will ensure the
result is unique.
The result of the query does not have to contain the key of the table
but must act as though the key was used.
http://download-west.oracle.com/docs...03sch.htm#1044

TODO: check your schema to make sure that there is a primary key or
unique index on your table that has only unique records.

tracy wrote:
Quote:
when i run the statement:
SQL> select rowid from student_semester;
ERROR at line 1:
ORA-01445: cannot select ROWID from a join view without a
key-preserved table

student_semester is a view with the sql :
CREATE OR REPLACE VIEW "ICEM_USER"."STUDENT_SEMESTER" ("STUD_ID",
"SEMESTER_STATUS_ID","SEMESTER_STATUS_YEAR",
"SEMESTER_STATUS_SEMESTER","SEMESTER_STATUS_PROGRA M",
"SEMESTER_STATUS_BRANCH","SEMESTER_STATUS_DESC ") AS
select
STUD_ID ,
SEMESTER_STATUS_ID ,
SEMESTER_STATUS_YEAR ,
SEMESTER_STATUS_SEMESTER ,
SEMESTER_STATUS_PROGRAM ,
SEMESTER_STATUS_BRANCH ,
SEMESTER_STATUS_DESC
from student_profile, semester_status
where stud_program = SEMESTER_STATUS_PROGRAM


Now, my users can't run query from a forms, which contains this
tables. Before yesterday, they able to do this.

Pls tell me what;s wrong and how to fix it.


TQ!

regards,
Tracy


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.