I've 2 tables
LOAN LOANID, LOANTYPE, LOANAMOUNT, NOOFINSTALLMNTS, REPAYMENTSTARTDATE, LOANSTATUS, LOANINSTALLMENT INSTALLMENTID, LOANID, INSTALLMENTAMT, INSTALLMENTNO, INSTALLMENTDUEDATE, INSTALLMENTPAYEDYN
LOAN
LOANID, LOANTYPE, LOANAMOUNT, NOOFINSTALLMNTS, REPAYMENTSTARTDATE, LOANSTATUS,
LOANINSTALLMENT
INSTALLMENTID, LOANID, INSTALLMENTAMT, INSTALLMENTNO, INSTALLMENTDUEDATE, INSTALLMENTPAYEDYN
When the value in 'INSTALLMENTPAYEDYN' field of all rows having same 'LOANID' becomes 'Y' in 'LOANINSTALLMENT'table, i need to update table 'LOAN' and set its 'LOANSTATUS' field value as 'CLOSED' for that particular 'LOANID'. How to write a trigger for this?