Oracle

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsDatabasesOracle

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old March 13th, 2010, 09:27 PM
sandip3040 sandip3040 is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 2 sandip3040 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 28 sec
Reputation Power: 0
Procedure in Oracle needed urgent

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.

Sample data, For db_dt = '01/01/2010', acc_cd-10101, close_bal_cr = 120,close_bal_dr = 100, acc_cd = 10102,close_bal_cr = 130,close_bal_dr= 50,for db_dt = '02/01/2010',acc_cd = 10102,close_bal_cr = 100
Then Sample out put of the procedure will
be
db_date acc_cd close_bal_dr close_bal_cr
01/01/2010 101 150 250
02/01/2010 101 300 350

Hope now my requirement is clear to you

Reply With Quote
Reply

Viewing: Tutorialized ForumsDatabasesOracle > Procedure in Oracle needed urgent


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap