you have two unrelated (unrelated to each other) one-to-many relationships
if you do a three-table join, then of course you will get "duplicates"
the only way that you can retrieve data from both one-to-many relationships at the same time in the same query is with a UNION, like this --
Code:
select M.mem_id
, M.mem_name
, 'member address: ' as address_type
, A.mem_add1 as address_1
, A.mem_add2 as address_2
from Member_master as M
inner
join Member_address as A
on M.mem_id = A.mem_id
union all
select M.mem_id
, M.mem_name
, 'relative address: '
, R.rel_add1
, R.rel_add2
from Member_master as M
inner
join Member_relatives as R
on M.mem_id = R.mem_id
note it's UNION ALL, not UNION
