Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LOCATING backwards
Message
De
24/10/2003 13:16:42
 
 
À
24/10/2003 12:05:32
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00842157
Message ID:
00842302
Vues:
30
Hi Cetin,

solution with index is natural and obvious,
but if i 300 type of expressions i need build a index every time.


I put this like a solution without index for found the last value,
implement like LOCATE and CONTINUE it is a simple improvement.

Try to Resolve this Problem with index.
I want the last occurrence of LIKE(m.var,memo1), on a 1Millions records table.
CLEAR
CREATE CURSOR t2 (f2 M )
RAND(3)
FOR K=1 TO 50000
INSERT INTO t2 VALUES (STR(1000000000*RAND()))
NEXT

var="*4?7*"
* like LOCATE
m.LastFound=RECCOUNT()+1
SET FILTER TO LIKE(m.var,f2) AND RECNO()<m.LastFound
GO BOTTOM
m.LastFound=RECNO()
?  RECNO(),F2
m.LastFound=RECNO()
* like CONTINUE
GO BOTTOM
m.LastFound=RECNO()
?  RECNO(),F2
* like CONTINUE
GO BOTTOM
m.LastFound=RECNO()
?  RECNO(),F2

m.LastFound=RECCOUNT()+1
var="*3?7*"
GO BOTTOM
m.LastFound=RECNO()
?  RECNO(),F2

SET FILTER TO
RELEASE LastFound

BROWSE
It is simple put this on a class and to widen the operation.

Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform