mikefight
Programmer
- Feb 2, 2007
- 14
CRXI r1
I have an SQL Database with a Name table and a loan table. I have dropped in the name table twice and the loan table twice. I have a left outer join with the name.SSN = name_1.SSN and name_1.AcountNumber != name.AccountNumber and a left outer join on from the name tables to the loan tables with the account numbers.
I get duplicate output.
Name Loan.ID Loan_1.ID
Bob 1 1
Bob 1 2
Bob 2 1
Bob 2 2
Bob 3 1
Bob 3 2
I want to get
Name Loan.ID Loan_1.ID
Bob 1 1
Bob 2 2
Bob 3
Then I want to total the loan balances for the ones shown.
I have an SQL Database with a Name table and a loan table. I have dropped in the name table twice and the loan table twice. I have a left outer join with the name.SSN = name_1.SSN and name_1.AcountNumber != name.AccountNumber and a left outer join on from the name tables to the loan tables with the account numbers.
I get duplicate output.
Name Loan.ID Loan_1.ID
Bob 1 1
Bob 1 2
Bob 2 1
Bob 2 2
Bob 3 1
Bob 3 2
I want to get
Name Loan.ID Loan_1.ID
Bob 1 1
Bob 2 2
Bob 3
Then I want to total the loan balances for the ones shown.