seand
New Member
- Joined
- Apr 13, 2004
- Messages
- 15
Hi Everyone
I really need help with a SELECT DISTINCT query. I have one table called Loans and in that table I need to select unique loan numbers from the "LoanID" column" but still need to list all other columns in the table here is my query
SELECT DISTINCT dbo_Liabilities.LoanID, dbo_Contacts.ShowAsName, dbo_CTRL_Lender.Lender, dbo_Liabilities.InitialPrincipal, dbo_Liabilities.Status, dbo_Liabilities.DateCommenced, dbo_AssetOwners.OwnerName
FROM (dbo_CTRL_Lender INNER JOIN dbo_Liabilities ON dbo_CTRL_Lender.ID = dbo_Liabilities.LenderLkp) INNER JOIN (Advisers INNER JOIN (dbo_AssetOwners INNER JOIN dbo_Contacts ON dbo_AssetOwners.ContactID = dbo_Contacts.ContactID) ON Advisers.ContactID = dbo_Contacts.OwnerID) ON dbo_Liabilities.LoanID = dbo_AssetOwners.AssetID
WHERE (((dbo_Liabilities.Status)="Application Pending"));
But is till return duplicate "LoanID" as this loan is linked to more than one person but I only want this loan to show up once, **PLEASE** help me
questions welcome, many thanks.

SELECT DISTINCT dbo_Liabilities.LoanID, dbo_Contacts.ShowAsName, dbo_CTRL_Lender.Lender, dbo_Liabilities.InitialPrincipal, dbo_Liabilities.Status, dbo_Liabilities.DateCommenced, dbo_AssetOwners.OwnerName
FROM (dbo_CTRL_Lender INNER JOIN dbo_Liabilities ON dbo_CTRL_Lender.ID = dbo_Liabilities.LenderLkp) INNER JOIN (Advisers INNER JOIN (dbo_AssetOwners INNER JOIN dbo_Contacts ON dbo_AssetOwners.ContactID = dbo_Contacts.ContactID) ON Advisers.ContactID = dbo_Contacts.OwnerID) ON dbo_Liabilities.LoanID = dbo_AssetOwners.AssetID
WHERE (((dbo_Liabilities.Status)="Application Pending"));
But is till return duplicate "LoanID" as this loan is linked to more than one person but I only want this loan to show up once, **PLEASE** help me
