Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To get Random values from a dbf.
Message
From
30/03/2004 10:08:47
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
30/03/2004 04:58:06
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00890690
Message ID:
00890780
Views:
20
>Dear Experts,
>
>I have a table, entitled abc, fields as follows
>sno n(3)
>figure n(5)
>
>The data of the table is as
>
>sno figure
>1 14587
>2 84871
>3 36548
>4 95972
>5 64788
>
>Now I want to brows only three records randomly from the dbf,such as 84871,95972,14587. What should be the source codes behind a click button?
>
>Please help

rand(-1)
select top 3 rand(), * from myTable order by 1

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform