3
Answers

duplicate record in one to many relationship

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
 
 
 
Answers (3)