Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I get the last 1000 records in a table
Message
From
26/09/2005 07:12:21
Jon Neale
Bond International Software
Wootton Bassett, United Kingdom
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01052591
Message ID:
01052970
Views:
7
Descending order?

>Hi Sergey
>
>Could you please clarify for me how your soln. gets the LAST 1000 recs? I'd've thought that this would get the FIRST 1000 recs in the criteria.
>
>Terry
>
>>
select TOP 1000 unemp_ins_pct from payroll_tbl ;
>>	where unemp_ins_pct # 0 ;
>>	into array a__gen40 ;
>>	order by payroll_tbl.id DESC
>>
>>>I am selecting a bunch of records into and array as follows:
>>>
>>>
>>>select unemp_ins_pct from payroll_tbl
>>where unemp_ins_pct # 0
>>into array a__gen40
>>order by payroll_tbl.id
>>>
>>>The above select statement gives me all the records in the table. What I would like to know is how can Select only the last 1000 records in the payroll_tbl?
>>>
Previous
Reply
Map
View

Click here to load this message in the networking platform