Home » SQL & PL/SQL » SQL & PL/SQL » How to Fetch The closing balance in every account number in the cursor block. (oracle 10g.)
How to Fetch The closing balance in every account number in the cursor block. [message #310478] Tue, 01 April 2008 07:06 Go to next message
someswar1
Messages: 53
Registered: January 2008
Member
Can any one help me how I write the code in the cursor block. The problem is as follows.
The maximum date time among the combination of (ADJUSTMENTTIME, ADJUSTMENTDATE) with respect to ACCOUNTNUMBER is to be considered and the corresponding BALANCEAFTER is to be mapped to CLOSING_BALANCE.

e.g if for ACCOUNTNUMBER 918134377 the ADJUSTMENTTIME, ADJUSTMENTDATE, BALANCEAFTER is
i> 070332, 20080129, 1.123569
ii> 190356, 20080129, 2.236598
iii> 000029, 20080130, 3.569874

then CLOSING_BALANCE will be 3.569874

so how i fetch the closing balance in every account number.

Regards:
Someswar Bhattacharjee

Re: How to Fetch The closing balance in every account number in the cursor block. [message #310481 is a reply to message #310478] Tue, 01 April 2008 07:09 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
exactly which part did you not understand in the reply to the previous message you posted in the PL/SQL Expert forum?
Michel Cadot wrote on Tue, 04 March 2008 09:06
It is clearly stated in the forum description: "Newbies should not post to this forum!"
Expert notion is defined in the sticky: Not an EXPERT? Post in the NEWBIES forum, NOT here
Rules are described in: OraFAQ Forum Guide
Follow them.

Regards
Michel

Re: How to Fetch The closing balance in every account number in the cursor block. [message #310499 is a reply to message #310478] Tue, 01 April 2008 07:40 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
someswar1, read your private message for important administrative matter.
Re: How to Fetch The closing balance in every account number in the cursor block. [message #310729 is a reply to message #310499] Wed, 02 April 2008 04:17 Go to previous message
rajatratewal
Messages: 507
Registered: March 2008
Location: INDIA
Senior Member
Do your cusror query returns 3 records for each ACCOUNTNUMBER??

Why don't you modify your cursor query to pick the closing balanace also with other details.

Study analytical functions in sql.

http://www.akadia.com/services/ora_analytic_functions.html

Previous Topic: Role based schema access
Next Topic: copying a column from one table to other table
Goto Forum:
  


Current Time: Sat Dec 10 09:07:29 CST 2016

Total time taken to generate the page: 0.13077 seconds