Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select command to highlight missing Numbers
Message
De
22/04/2008 11:42:45
 
 
À
22/04/2008 11:37:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01311939
Message ID:
01312397
Vues:
23
>Hi Fred,
>
>>Does this work any better?
>>
>>
create CURSOR sequence (nval n(3,0))
>>INSERT INTO sequence VALUES (1)
>>INSERT INTO sequence VALUES (2)
>>INSERT INTO sequence VALUES (4)
>>INSERT INTO sequence VALUES (5)
>>INSERT INTO sequence VALUES (6)
>>INSERT INTO sequence VALUES (9)
>>INSERT INTO sequence VALUES (11)
>>INSERT INTO sequence VALUES (12)
>>INSERT INTO sequence VALUES (15)
>>
>>SELECT x.nval+1 gapstart, MIN(y.nval)-1 AS gapend ;
>>       FROM sequence x, sequence y ;
>>       WHERE x.nval < y.nval ;
>>       GROUP BY x.nval ;
>>       HAVING gapend - x.nval >= 1
>>
>>
>>
>>It gives you a gapstart and a gapend when there are multiple missing sequential numbers. (Thanks to Walter Meester on this several years ago)
>
>Same problem, 15 minute run and "File too large..." error.

Hmm, too bad. I never had to run it on more than about 40K records and worked fine there. Could you process the main file in smaller chunks?
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform