select
lncontmaster.coop_id,
lncontmaster.member_no,
lncontmaster.loantype_code,
lncontmaster.loancontract_no,
lncontmaster.last_periodpay,
lncontmaster.loanapprove_amt,
lncontmaster.period_payment,
lncontmaster.principal_balance,
lncontmaster.withdrawable_amt
from
lncontmaster
where
lncontmaster.contract_status >0
order by lncontmaster.loantype_code ,loancontract_no