Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append Random values with Criteria
Message
From
31/03/2004 05:07:51
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
31/03/2004 04:40:06
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00891100
Message ID:
00891103
Views:
16
>Dear Sir,
>
>I want to append records between given numbers.
>For example the values must between FirstNo=50 and LastNo=175
>How is it possible?
>
>range1=10
>FirstNo=50
>LastNo=175
>
>CLOSE DATABASES
>CREATE TABLE Random (cValue N(3))
>FOR nItem = 1 TO range1 && Append number of records in range1
> APPEND BLANK
> REPLACE cValue WITH 1 + 100 * RAND( )
>ENDFOR
>
>Please Help
range1=10
FirstNo=50
LastNo=175

CREATE TABLE Randoms (nValue N(3))
Rand(-1)
FOR nItems = 1 TO range1
  Insert into randoms values (Rand()*(m.LastNo-m.FirstNo)+m.FirstNo)
ENDFOR
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