Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert missing records
Message
De
26/12/2006 12:35:50
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
25/12/2006 21:22:58
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 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01180147
Message ID:
01180227
Vues:
28
>Dear Experts
>
>Table1 has only one numeric field as sno n(4)
>
>It has records as
>
>1
>25
>1500
>1800
>
>In sno field, I want to insert missing records between 1 to 2500.
>
>Please help

Here is another alternative:
use MyTable order "Sno"
for i = 1 to 2500
  if not seek(i)
    append blank
    replace Sno with i
  endif
next
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