Procedure in Oracle needed urgent

Discuss Procedure in Oracle needed urgent in the Oracle forum on Tutorialized. Procedure in Oracle needed urgent Oracle forum covering the long-time player in the database and data warehousing sphere. The Oracle database product is probably the template for all other SQL-based robust databases. Discuss more about Oracle here.

Greetings to all of you. I need to write a procedure in Oracle 9i urgently. My requirement is - I have a table namely db.
Structure of db is (db_id(number) primary key,db_dt date,close_bal_cr number(10.2),close_bal_dr number(10,2),acc_cd number (5));
Now acc_cd is actually 3 digits from the beginning, for example if data in acc_cd is 10101 ,real acc_cd is 101,the end two number is branch code and varies from 01 to 09. Sometimes every acc_cd need not to be in any branch also
Now I have to write a procedure which takes two date ie
p_proc(starting_dt date,end_date date)
this procedure takes data from db and creates a temporary table tt
which contains db_dt, acc_cd , sum of close_bal_dr for all branches for every code every day ,sum of close_bal_cr for all branches for every acc_cd every day ) kindly let me know this asap.