You are not logged in.
Pages: 1
Hi Team,
I am creating a Dynamic List with the following query :
select a.payment_id,A.FILE_NAME,a.INSTRUMENT_REFERANCE_NO,a.payment_amount,a.status ,
b.*,c.*,d.product_code from payment_instruction a,mtg_sending_queue b,MTG_AUDIT_TRAIL c,payment_product_mst d
where
a.payment_id=b.source_txn_id
and b.txn_id=c.message_id
and b.utr_number is null
and Payment_value_date= sysdate
and a.status in ('DB','MS')
and a.product_id=d.product_id
order by received_ts desc
But I get the following error :
Query could not be executed: ORA-00918: column ambiguously defined
I discovered the problem .......it's because of the b.*,c.* in the query. Is there a way in which I will be able to select all the columns associated with tables b & c ?
Offline
Hi Gaurav,
you have to avoid redundant naming in the stars due to the wrapping of the initial query into brackets. Therefore you can use stars only if and only if the column sets have no common elements. Now this is quite often not the case and therefore you will have to make one star obsolete and only use one star.
Hope this helps.
Jan
Offline
Pages: 1