Emmitt,

Why not use a SELECT ... INTO .... WHERE COUNT = LAST

Dennis McGrath

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Emmitt
Dove
Sent: Monday, February 03, 2003 7:14 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: OPEN cursor RESET



Albert,

There are quite good uses for cursors without loops.  One place we use them
is trying to find the last value for invoice number in an application where
the invoice number is permanently bound within a 10000-number
range.  (Invoice number hits 19,999 for example and then reverts to
10,000.)  In this case a SCROLL cursor with a FETCH LAST works quite nicely
where SELECT (MAX(...)) would not.

>Do you know, I have never used a cursor without a loop? I only use cursors
>to return individual items from a set of items one at a time. In other
>cases I SELECT ... INTO ... FROM ... WHERE ...
>

Emmitt Dove
Manager, DairyPak Business Systems
Blue Ridge Paper Products, Inc.
40 Lindeman Drive
Trumbull, CT  06611
(203) 673-2231
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Reply via email to