At 03:07 PM 12/27/2001 -0000, Ben Petersen wrote: >Working from the bottom up, you can count on the two numerics of >each record being bounded by the next record, ie 4 and 11 of ID2 >would enclose 7 and 8 of ID3... 1 and 12 of ID1 enclose 4 and 11 >of ID2.
Using The Glorious R:BASE 2000 (ver 6.5) and higher for Windows or The R:edoubtable R:BASE 2000 (ver 6.5) and higher for DOS, you can take advantage of SCROLLING CURSORS in R:BASE. To understand the concept of SCROLLING CURSORS and how to achieve your goal, try the following example: -- CONN CONCOMP CLEAR ALL VAR SET VAR vEmpID INTEGER = NULL SET VAR vEmpFName TEXT = NULL SET VAR vEmpLName TEXT = NULL SET ERROR MESSAGE 705 OFF DROP CURSOR C#1 DECLARE C#1 SCROLL CURSOR FOR SELECT + EmpID,EmpFName,EmpLName FROM Employee + ORDER BY EmpID OPEN C#1 FETCH LAST FROM C#1 INTO + vEmpID INDIC ivEmpID, + vEmpFName INDIC ivEmpFName, + vEmpLName INDIC ivEmpLName WHILE SQLCODE <> 100 THEN CLS SHOW VAR PAUSE FOR 1 SET VAR vEmpFName = NULL SET VAR vEmpLName = NULL FETCH PRIOR FROM C#1 INTO + vEmpID INDIC ivEmpID, + vEmpFName INDIC ivEmpFName, + vEmpLName INDIC ivEmpLName ENDWHILE DROP CURSOR C#1 CLEAR ALL VAR -- Notes: . FETCH LAST FROM C#1 INTO ... Moves the cursor from its current position immediately to the last row as specified by the DECLARE CURSOR command. . FETCH PRIOR FROM C#1 INTO ... Moves the cursor backwards through the rows. The PRIOR option gets the previous row based on the current cursor position, and steps through the rows one-by-one going backwards. Enjoy and make sure to have fun! Happy Holidays and a Peaceful & Prosperous 2002! Razzak. ===================================-============================ R:BASE Developers's Conference: http://www.rbase.com/conference Official R:BASE List Server: mailto:[EMAIL PROTECTED] RBTI Events/Training: http://www.rbase2000.com/events R:DCC Members: http://www.rbase2000.com/rdcc ================================================================ R:BASE, Oterro & R:Tango are registered trademarks of RBTI. ==================================-============================= ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l
