Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
select table
set order to dg && assume you have an index on that field
dgcurrent = dg
counter=0
scan
If dgcurrent < dg
dgcurrent = dg
counter = 1
else
counter = counter + 1
endif
if counter > 10
scan while dg=dgcurrent
delete
endscan
endif
endscan
select table
set order to dg && assume you have an index on that field
dgcurrent = -9999 && anything lower than any dg value could ever become
scan
If dgcurrent < dg && entereing the scan this must be true, as dgcurrent is initialized lower than any dg value
dgcurrent = dg
counter = 1
else
counter = counter + 1
endif
if counter > 10
delete while dg=dgcurrent
endif
endscan
* preparing test data
Create Cursor curTest (dg I)
For lni=1 To 3
For lnj=1 To 14
Insert Into curTest Values(lni)
Endfor
Endfor
Index On dg Tag dg
*----
Set Deleted On
Set Order To dg && an index on that field must exist
dgcurrent = -9999 && anything lower than any dg value could ever become
Scan
If dgcurrent < dg && entereing the scan this must be true, as dgcurrent is initialized lower than any dg value
dgcurrent = dg
counter = 1
Else
counter = counter + 1
Endif
If counter > 10
Delete While dg=dgcurrent
* after the delete, the record pointer already points to the next dg value
dgcurrent = dg
counter = 1
Endif
Endscan
Set Deleted Off
Browse