Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Unique IDs in a VIEW
concat the table name with its rowid
Stacy Mader wrote:
>
> Greetings all.
>
> I'm using a perl code to access an Oracle (V7.3.3) VIEW, which consists
> of to UNIONED tables. Now, the original perl code is
> designed to use the unique id belonging to every row in the entire
> database (that's the ROWID). After playing around with the code,
> I found that VIEWs don't contain that information, or at least not in
> the same way as TABLEs.
>
> Is there a way to create a VIEW with such an unique id?
>
> The SQL statement the perl code uses is:
>
> $sql_statement = "select $db.$DBROWIDNAME, ";
>
> and the resulting error message is:
>
> Can't prepare statement: ORA-01445: cannot select ROWID from a join view
> without a key-preserved table (DBD: error possibly near <*> indicator at
> char 78
> in 'select report_response.rowid, FAULT_NO, ISSUE, RESPONSE_NO, RESPONSE
> from <*>report_response where (ISSUE like '%perseus% %crash%')').
>
> SQL: select report_response.rowid, FAULT_NO, ISSUE, RESPONSE_NO,
> RESPONSE from report_response where (ISSUE like '%perseus% %crash%')
>
> Thanks alot.
>
> Stacy.
Received on Sat Mar 25 2000 - 10:33:34 CST