Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select command to highlight missing Numbers
Message
From
22/04/2008 11:42:45
 
 
To
22/04/2008 11:37:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01311939
Message ID:
01312397
Views:
22
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform