Hello friend,
If you want to select TOP 10 values from your table then use something like this...
Select TOP 10 ins.Transaction_no from Voucher_slip v,
Loan l,
Installments i,
Customer c,
Installment_Payment ins
where l.Loan_id=v.Loan_id
and c.Loan_id=v.Loan_id
and l.Loan_id=ins.Loan_id
and c.Customer_CNIC = '12345-1234567-8'
ORDER BY v.Installment_no DESC
If you want to select only one value from your table then use something like this...
Select TOP 1 ins.Transaction_no from Voucher_slip v,
Loan l,
Installments i,
Customer c,
Installment_Payment ins
where l.Loan_id=v.Loan_id
and c.Loan_id=v.Loan_id
and l.Loan_id=ins.Loan_id
and c.Customer_CNIC = '12345-1234567-8'
ORDER BY v.Installment_no DESC