Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alias not found
Message
From
21/07/2004 22:13:14
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
21/07/2004 16:03:00
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00926486
Message ID:
00926863
Views:
25
>hi,
>
>ok ,i put this example ,i get it.
>thank you.
>i have 3 qustion,
>1. i use your code to chise 4500 records randomly,but i get all of them same information,

Well, I didn't concentrate on choosing 4500 randomly. I just created 4500 records. I must have missed this part.

If you want to choose random records, an easy way is like this: if you have 100,000 records, and know that you want 4500 records (4.5% of the total), you can:
select * from MyTable where rand() < 4500 / 100000
You will not get exactly 1000 records, but the results should be approximately correct.

>2. i have at my excel sheet field as date(10-02-2004) some times with time as(10-02-2004 10:15:23)
>if i let my fld c(10) i get number as 6547
>if i change to date(8) i get nothing.
>what is the code can let the date just date,and i can use that code with my code

The number represents the number of days since a specific date - I think it was 31-dec-1899.

>3. i have 2 excel sheet at the same book, but ineed sheet 2 to do my operation, is any code can do that autamticly.

You can control Excel from VFP - this is called "Automation".

Before asking more advanced questions, first try the basic exercises, and try to understand the fundamentals, in my article http://www.utmag.com/September2002/Page45.asp.

HTH,

Hilmar.
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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform