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!

Am I using a LOV? (ambiguously defined column)

982108Feb 20 2013 — edited Feb 20 2013
I have two tables:
create table products (prod_cd varchar (10) , prod_desc varchar2(20)); /
create table cases (case_id varchar(20), client_desc varchar(20), client_id varchar(20)) /
The cliient_id of cases table matches the prod_cd of the products table. The client desc = prod_desc.

I have this kind of data in the products table

PROD_CD PROD_DESC
1 Fish R Us
2 Tanning Oils Inc
3 Jane but Sane

However, if I try this query
selelct prod_cd, client_id
from products, cases
where prod_cd = client_id
Fails...

ORA-00918: column ambiguously defined
00918. 00000 - "column ambiguously defined"
*Cause:
*Action:
Error at Line: 7 Column: 7

I think prod_cd is a LOV. How can I get the vlaue out of it so my column inst ambiguously defined?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 20 2013
Added on Feb 20 2013
4 comments
310 views