Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Incident Reports » Incident Reports Addressed for Version 2.05 » View Incident Report |
Serious |
Reported By: Terry Swiers Reported On: 12/11/2010 For: Version 2.04 Build 4 |
SCRIPT BEGIN DECLARE CustNum INTEGER DEFAULT 80; DECLARE SequenceNumber INTEGER DEFAULT 57405; DECLARE ARCursor SENSITIVE CURSOR FOR Stmt; DECLARE lPrevBal FLOAT DEFAULT 0; DECLARE lBalance FLOAT DEFAULT 0; DECLARE lCurBal FLOAT DEFAULT 0; PREPARE Stmt FROM 'SELECT custnum, prevbal, balance, curbal FROM ar where custnum = ? and SequenceNumber >= ? order by SequenceNumber'; OPEN ARCursor USING CustNum, SequenceNumber; --get the previous balance for the next record FETCH FIRST FROM ARCursor ('CurBal') INTO lPrevBal; --move to the next record FETCH NEXT from ARCursor ('Balance') into lBalance; WHILE NOT EOF(ARCursor) DO UPDATE ARCursor SET 'PrevBal' = lPrevBal, 'CurBal' = Round(lPrevBal + lBalance, 2); SET lPrevBal = Round(lPrevBal + lBalance, 2); FETCH NEXT FROM ARCursor ('Balance', 'CurBal') INTO lBalance, lCurBal; END WHILE; END
This web page was last updated on Wednesday, October 30, 2024 at 11:41 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |