>hi,
>thank you for reply.
>
>at mytable field(flage) i have many records with flag=1,
> many records with flage=2, and flage=3 s etc...,
>i need to get 5 records form flag=1 ,5 record form flage=2,and 5 records from flag=3 ..etc to insert to new table.
>
>thanks
One way to do this is like this:
select table1
set order to "flag"
for i = 1 to 20
seek i
copy next 5 to temp while flag = i
select table2
append from temp
next
This will get the first 5 records in each group. If you want to select records randomly, it will be a little more complicated.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)