chiba Posted August 31, 2012 Share Posted August 31, 2012 I am new to Oracle and need to write a script to extract data from three tables. The code below works and produces results. For every transaction in the transaction_table it produces a row with the customers details. select u.account_id, u.currency_code, u.country_of_residence_name, t.bet_desc, t.event_name, t.amount, t.settled_dt, t.acc_stat_summ_id from transaction_table t inner join customer_details u on t.account_id = u.account_id where u.country_of_residence_name = 'Canada' and t.bet_desc = 'Withdrawal' and t.event_name = 'Bank Transfer' and t.settled_dt> '01 Aug 2012' But I need to link it to a further table , how can this be done? I tried he following but got no results. select u.account_id, u.currency_code, u.country_of_residence_name, t.bet_desc, t.event_name, t.amount, t.settled_dt, t.acc_stat_summ_id from transaction_table t inner join customer_details u on t.account_id = u.account_id inner join bank_transfers b on t.acc_stat_summ_id = b.bank_transfer_id where u.country_of_residence_name = 'Canada' and t.bet_desc = 'Withdrawal' and t.event_name = 'Bank Transfer' and t.settled_dt> '01 Aug 2012' Link to comment https://forums.phpfreaks.com/topic/267865-help-writing-an-oracle-script-to-join-three-tabels/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.