Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select command to highlight missing Numbers
Message
From
22/04/2008 13:01:22
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01311939
Message ID:
01312424
Views:
21
>>I'm going to give that a try. I like this approach, as defining the gaps is my desired result. Unfortunately, this is the smallest of 8 tables that I need to look at.
>>
>>>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?
>
>Maybe this would work better, plain old xbase style code:
>
>
>CREATE CURSOR gaps (gapstart i, gapend i)
>SELECT sequence
>GO TOP
>nstart = nval - 1
>nend = nstart
>SCAN ALL
>  IF nstart+1=nval
>    nstart = nval
>    LOOP
>  ENDIF
>  IF nstart<nval
>    nstart = nstart + 1
>    nend = nval - 1
>  ENDIF
>  INSERT INTO gaps VALUES (nstart,nend)
>  nstart = nval
>ENDSCAN
>
>
>40K records takes about .08 seconds.
>400K takes about .67 seconds.

Perfect. 2 seconds here.
Previous
Reply
Map
View

Click here to load this message in the networking platform