Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compute many operations
Message
 
To
06/09/2004 14:06:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00939290
Message ID:
00939860
Views:
20
In addition to Nadya's post, a lazy guy like me would add an extra field in the final table - like RANDOMKEY n(8,5)
then

go top in mycursor
scan
repl randomkey with rand(-1)
endscan
index on randomkey tag randomkey
set order to randomkey
go top

Now you have a random ordered table for output!


>hi,
>thank you very much,
>
>it works, i need your help to insert all results i get to new table
>
>i get result ex..
>
>Team 1 has 200 records
>Team 2 has 100 Records
>Team 3 has 50 Records
>Team 4 has 300 records
>Total records from all teams = 650
>
>Team 1 percentage of all records = 200/650 = 31% or 47 records of 150 records
>Team 2 percentage of all records = 100/650 = 15% or 23 records of 150 records
>Team 3 percentage of all records = 50/650 = 8% or 12 records of 150 records
>Team 4 percentage of all records = 300/650 = 46% or 69 records
>
>? 47+23+12+69 = 151 records
>
>47 *4 records from team 1
>23 *4 records from team 2
>11 *4 records from team 3
>69 *4 records from team 4
>======================
>580 records from all teams!!!
>i want to insert randomly all records under to new table, and deleted form table1
>
>next area ..
>
>
>
>
>thanks.
>m.qasem
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform