Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Ambigous error with "using" syntax

669850Nov 11 2008 — edited Nov 12 2008
When generating a view, the following statement fails with version 10.2.0.4 Patch 8, however it is successful using 10.2.0.3 and 10.2.0.4 prior to implementing patch 8.

The reason it is failing is an "ambiguous" error for the column ROLLUP_SOURCE_TYPE_KEY.

I can see this as the same column name is in both ROLLUP_SOURCE and ROLLUP_SOURCE_TYPE.

However, if I attach the table name to take the column from, like ROLLUP_SOURCE.ROLLUP_SOURCE_TYPE_KEY a different error occurs indicating that no qualifier is required.

Has anyone experienced any issues with the "using" syntax on this patch?

select ROLLUP_SOURCE.ROLLUP_SOURCE_KEY,
ROLLUP_SOURCE.NAME as SOURCE_NAME,
ROLLUP_SOURCE.ENABLED as SOURCE_ENABLED,
ROLLUP_SOURCE_TYPE_KEY,
ROLLUP_SOURCE_TYPE.DISPLAY_NAME as SOURCE_TYPE_DISPLAY_NAME,
ROLLUP_BATCH.ROLLUP_BATCH_KEY,
ROLLUP_BATCH.START_TIME,
ROLLUP_BATCH.START_TIME_ER,
ROLLUP_BATCH.COMPLETION_TIME,
ROLLUP_BATCH.COMPLETION_TIME_ER,
ROLLUP_BATCH.DURATION,
ROLLUP_BATCH.IS_ROLLUP_NOW,
ROLLUP_BATCH.IS_COMPLETE,
ROLLUP_BATCH.IS_SUCCESS,
ROLLUP_BATCH.IS_LATEST_COMPLETE,
ROLLUP_BATCH.IS_LATEST_SUCCESS,
ROLLUP_BATCH.STATUS,
ROLLUP_BATCH.STATUS_MESSAGE,
ROLLUP_BATCH.LAST_STATUS_UPDATE,
ROLLUP_BATCH.LOG_ARCHIVE
from SAHARA.ROLLUP_SOURCE
join SAHARA.ROLLUP_SOURCE_TYPE using (ROLLUP_SOURCE_TYPE_KEY)
left outer join SAHARA.ROLLUP_BATCH
on ROLLUP_SOURCE.ROLLUP_SOURCE_KEY = ROLLUP_BATCH.ROLLUP_SOURCE_KEY
and ROLLUP_BATCH.IS_LATEST = 'T';

I can remove the "using" syntax and do basic left joins on the tables, but i'm concerned about this working in 10.2.0.3 and 10.2.0.4 prior to patch 8 and not after.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 10 2008
Added on Nov 11 2008
8 comments
382 views