There is a table Customer and Credit (Borrower1 and Borrower1)

Why do I have a borrower on a key2 is the name of the borrower of the 1st ??

SELECT Кредит.NДоговора, Кредит.ДатаДог, ФИО, ТипКредита, Кредит.Сумма, ТипГрафика.ТипГрафика, ДатаВыдачи, ДатаЗакрыт, Ставка, СтатусКредита, ФИО FROM [Кредит], [ТипКредита], [ТипГрафика], [СтатусКредита], [Клиент] WHERE (Кредит.Заемщик1ID = Клиент.ID) AND (Кредит.ТипКредитаID = ТипКредита.ID) AND (Кредит.ТипГрафикаID = ТипГрафика.ID)" + " AND (Кредит.СтатусID = СтатусКредита.ID) AND (Кредит.Заемщик2ID = Клиент.ID) 
  • one
    I formatted your question. Make the code in this form in the future - and people will reach for you! Check again and correct your question. And what is this " + " in your WHERE? - Sergey Nudnov
  • It's amazing that you get something out at all. conditions (Кредит.Заемщик1ID = Клиент.ID) AND (Кредит.Заемщик2ID = Клиент.ID) can only work if the Borrower1ID is equal to Borrower2ID. If you need the names of two borrowers, then you need to use a table with names twice (of course, giving it different aliases) - Mike
  • PROMPT HOW? - Gersa

0