How to prevent duplicate records in one too many relationships using SQL join query
create procedure loantype5
(@id int)
as
begin
select customer.Id,interest20.principalamount as principalamount,interest20.loantype as loantype,emi22.principalamount1 as principalamount1,emi22.loantype1 as loantype1 from customer
left join interest20 on customer.Id=interest20.customerid
left join emi22 on
where customer.Id=@id
group by
customer.Id,
interest20.principalamount,
interest20.loantype,
emi22.principalamount1,
emi22.loantype1
end
3 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mohan ArumugamPosted Jun 14, 2018, 6:43 AM
Mohan ArumugamPosted Jun 14, 2018, 6:38 AM
Jayakumar BalasubramaniamPosted Jun 14, 2018, 5:51 AM