Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use the Delete Command
Message
From
07/12/2006 18:08:29
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
07/12/2006 17:39:57
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01175897
Message ID:
01175912
Views:
6
>Hi, i have a dbf file and i want to delete the first 1700 records from these table using the command line. I´m using the visual fox ver. 6.0 and i´d enter the command DELETE with this syntaxis: DELETE [Scope] [FOR lExpression1] [WHILE lExpression2] [IN nWorkArea | cTableAlias] [NOOPTIMIZE].
>But i don´t know how to use it because i saw this from the help opf visual fox ver. 8.0
>Please help me...

Several ways, for instance:
use MyTable
delete next 1700

* or
use MyTable
delete for recno() <= 1700
Results may be slightly different between the two, if you have records that are already deleted.

Also:
delete from MyTable where recno() <= 1700
Using recno() in SQL commands is usually not recommended, but I think it works if you work with a single table.
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
Reply
Map
View

Click here to load this message in the networking platform