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.
* determine all unique mailcodes
SELECT DISTINCT MAILCODE as mailcode from yourtable INTO CURSOR mailcodes
* go through each of them
SELECT yourtable
SET ORDER TO mailcode
SELECT mailcodes
SCAN
SELECT yourtable
SET KEY TO mailcodes.mailcode
SCAN NEXT 3
*do whatever - mark records as found/relevant, process them
ENDSCAN
ENDSCAN
Perfect Chris, thank you so much for your help.First threee of a group of the same mailcode, I assume. Then by which order, first three requires an order to tell what's the first three in some specific order.
If you mean by physical order, then the straight forward xbase code would be
Code:* determine all unique mailcodes SELECT DISTINCT MAILCODE as mailcode from yourtable INTO CURSOR mailcodes * go through each of them SELECT yourtable SET ORDER TO mailcode SELECT mailcodes SCAN SELECT yourtable SET KEY TO mailcodes.mailcode SCAN NEXT 3 *do whatever - mark records as found/relevant, process them ENDSCAN ENDSCAN