SQL calculation (Oracle) -


I have two db tables fine and fine. Fine has Fields * Forrest_ID [PK]
* Penalty_mount

There are fields in Fine_payment - * OK_Pemment_ID [PK]
* Forrest_ID
* Payment_mount

Therefore There may be several payments in every fine. How do I go about choosing the penalties that are not fully paid and show unpaid amount?

Oracle DB

  choose fine_id, fine_amount ----- --------- ----------------------------------------- -------- - - Insert one here, if "payment" gives a new match -------------------------- --------- ----------------------------, (OK_AMIT - COLLACES (payment.lalp_pad, 0)) Submit Outstanding Outside Balance as Outside External (Select OK_ID, OK (OK_ID) from FIN_PAPMENT GROUP already deposited in form of Payment (payment_size, 0), OK. Do not pay any taxes on the payments.Fin_ID where fine.fin_mount    

edit : internal included to < Code> has been replaced with external external partner

/ P>


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -