Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Calculate Op.bal and Cl.Bal

SANPATSep 1 2015 — edited Sep 1 2015

Hi,

I want to update the table with Opening Balance & Closing Balance . for each Item for every record , Change of Month want to transfer balance to Next Month 1st as Opening Balance .

User is going to enter the confirm stock , based on previous closing will become opening for this entry and after calculation it will update for closing . How to use the over partion in such case.

for Example

PLANFORMO PRODUCTCODE OPCONFIRMQTY CONFIRMQTY CLCONFIRMQTY

--------- ----------- ------------ ---------- ------------

19-AUG-15      507105                       0                 51                    51

19-AUG-15      507105                       51                30                    81

20-AUG-15      507105                       81                12                    93

01-SEP-15      507105                        93                7                    100

select planformonth,productcode,opconfirmqty,confirmqty,clconfirmqty from fgsalesplan order by planformonth;

sandy

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 29 2015
Added on Sep 1 2015
4 comments
700 views