Oracle SQL, PLSQL, APEX How To's by Dr. S. Raghunathan - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

Totals of Raak-trans-detail ( Voucher-Detail ) Debit, Credit should get stored in raak-trans-master (Voucher Master ) on each insert or update or delete on voucher details, Hence we shall create another after insert or update or delete trigger on raak- trans- details as follows insert or update trigger

How to use after insert or update trigger

 

create or replace trigger "RAAK_TRANS_DETAIL_AIUD" AFTER

insert or update or delete on "RAAK_TRANS_DETAIL" begin

update raak_trans_master set

 

debit_total - (select sum(nvl(debit,0)) from raak_trans_detail

where raak_trans_detail.voucher_number - raak_trans_master.voucher_number),

credit_total - (select sum(nvl(credit,0)) from

 

raak_trans_detail

 

where raak_trans_detail.voucher_number - raak_trans_master.voucher_number);

end;

 

 

 

 

 

This concludes creation of these three table properties, leaving  any business rules left on these tables and like to create new application with a play role of above tables, Before we proceed on creation of application, we will try to learn some more PLlSQL Concepts and creation of procedures, functions for some time,

 

Find Your Next Great Read

Describe what you're looking for in as much detail as you'd like.
Our AI reads your request and finds the best matching books for you.

Showing results for ""

Popular searches:

Romance Mystery & Thriller Self-Help Sci-Fi Business