Hi All, I am executing the below query with Oracle ANSI left outer join syntax,It's returning 107 records:
SELECT bs_accts.acct_num,
bs_accts.acct_name,
br_data.record_id ,
as_users.username,
br_fx.fx_rate ,
FROM bs_accts
CROSS JOIN as_users
CROSS JOIN br_fx
left outer join br_data
ON (as_users.userid = br_data.last_note_user AND br_fx.iso_src = br_data.user_ten)
WHERE br_data.state=3
AND (br_data.acct_id = bs_accts.acct_id)
AND (bs_accts.acct_currency='SHS')
AND substr(bs_accts.acct_num,1,1)='T'
AND br_fx.iso_dst = 'USD';
when I am executing the same query without ANSI syntax It's returning 875 records.I want 875 records with ANSI code.Below is the older left outer join syntax:
SELECT bs_accts.acct_num,
bs_accts.acct_name,
br_data.record_id ,
as_users.username,
br_fx.fx_rate ,
FROM bs_accts,as_users,br_fx,br_data
WHERE br_data.state=3
AND (br_data.acct_id = bs_accts.acct_id)
AND (bs_accts.acct_currency='SHS')
AND substr(bs_accts.acct_num,1,1)='T'
AND br_data.last_note_user=as_users.userid(+)
AND br_data.user_ten = br_fx.iso_src(+)
AND br_fx.iso_dst = 'USD';
Is there something wrong with ANSI Code above??