Connecting Tech Pros Worldwide Forums | Help | Site Map

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

kaapie
Guest
 
Posts: n/a
#1: Jun 27 '08
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

Closed Thread