Page 1 of 1

Master Detail ORA-00918

Posted: Wed 01 Jun 2011 12:11
by ketas
Hi,

i have master toraquery with
sql "select acnt_id master_acnt_id,account_name from accounts acnt"
fields master_acnt_id and account_name

and detail toraquery :

select aagr.acnt_id detail_acnt_id, aagr.agr_id,aagr.id,agr.agname,aagr.shp_id,shp.shop_name
from acnt_artgrps aagr,artgroups agr,shops shp
where aagr.agr_id = agr.agr_id
and aagr.shp_id = shp.shp_id

fields: DETAIL_ACNT_ID, AGR_ID,ID,AGNAME,SHP_ID,SHOP_NAME

It is not possible to make master detail relation master_acnt_id->detail_acnt_id - due to error ORA-00918 - column ambiguously defined. When i delete table shops from detail toraquery (although has no column names like all other tables), everything is o.k. Could you please help me to solve this problem?

Thanks. Best Regards Vojslav

Posted: Wed 01 Jun 2011 12:30
by AlexP
Hello,

To resolve the problem you should set the DetailFiled property like

Code: Select all

DetailFiled := 'aagr.acnt_id';

Posted: Wed 01 Jun 2011 13:30
by ketas
Hi,

many thanks, this solved my problem . I had this value "aagr.acnt_id" in field origin.

Best Regards. Vojslav

Posted: Wed 01 Jun 2011 13:50
by AlexP
Hello,

Glad to see that the problem was solved. If you have any other questions, feel free to contact us.