area 1 day 1 day2 day 3 800 + 800 + 800 ---->2400 records randomly area 2 day 1 day2 day 3 800 + 800 + 800 ---->2400 records randomly area 3 day 1 day2 day 3 800 + 800 + 800 ---->2400 records randomly total is 7200 recordsthis the code i'll try to do above
CLOSE ALL use one copy structure to TempResult use TempResult in 0 select *, rand() * 0.000000 as random; from MyTable; into cursor Temp; order by date_code AND area brow go top for i = 1 to 3 select Temp locate rest for area = i AND date_code=i copy next 800 to temp2 while area = i and date_code = i select TempResult append from temp2 nextthanks