Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use the Delete Command
Message
De
07/12/2006 18:08:29
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
07/12/2006 17:39:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01175897
Message ID:
01175912
Vues:
7
>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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform