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!

ORA-00918: column ambiguously defined

RobeenFeb 10 2021

Oracle DB 12.1.0.2
Hello Team,

I am getting error below after I add code highlighted below.
select mp.id "profile ID",mp.merchant_name_en,status, mp.prod_merchant_id,mp.contact_number,mp.contact_address,mp.email,mp.type,mp.merchant_br,mp.contact_name,mp.create_timestamp,mp.update_timestamp,
pmr.bank_owner_name,pmr.bank_code, pmr.branch_code,pmr.bank_account, pmr.bank_name,pmr.bank_address,pmr.payment_comm_rate,pmr.payment_comm_type,pmr.cashin_comm_rate,pmr.cashin_comm_type,
pmr.airtimetopup_comm_rate,pmr.airtimetopup_comm_type,pmr.type,
mco.company_name_en,mco.trading_name,mco.brn,mco.trade_licence,mco.cert_of_incorporation,mco.vat_no,mco.trading_address_line_1,mco.trading_address_line_2,mco.trading_address_line_3,mco.city,mco.contact_number_mobile,mco.contact_number_fixed,
mco.contact_email,mco.create_timestamp,mco.update_timestamp,mio.owner_first_name_en,mio.owner_middle_name_en,mio.owner_last_name_en,mio.id_number,id_type,mio.contact_number_mobile,mio.contact_number_fixed,mio.contact_email,
mio.create_timestamp,mio.update_timestamp,
ap.name_en as NAME333,ap.api_key as APIKEY,ap.PUBLIC_KEY,ap.PRIVATE_KEY,ap.STATUS,ap.ACCEPT_PAYMENT_TYPE,ap.ACCEPT_TOP_UP_TYPE,ap.CREATE_TIMESTAMP,ap.UPDATE_TIMESTAMP

from gold_mps.merchant_profile mp,goldd.psg_merchant_report pmr,gold_mps.merchant_company_owner mco,gold_mps.merchant_individual_owner mio,gold_mpp.app ap

where pmr.merchant_id=mp.prod_merchant_id and mco.profile_id=mp.id and mio.profile_id=mp.id and ap.id=mp.prod_merchant_id;

I tried to put aliases to the columns but still I am hitting error.

Kindly advise.

Thanks,

Roshan

This post has been answered by mathguy on Feb 10 2021
Jump to Answer
Comments
Post Details
Added on Feb 10 2021
2 comments
6,138 views