Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Searching for a partial string
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Searching for a partial string
Divers
Thread ID:
00663531
Message ID:
00663531
Vues:
49
High all!

I am trying to search through a 1 million record table for a partial license plate number. Someone may know 3 letters of the plate number and those three letters could be anywhere in the field. I am experimenting with the code below but it is too slow. I have used all of the AT() commands and Occurs().
The table is indexed on ALLTRIM(plate_no). Pretty much the same results. Any help would be greatly appreciated.
clear
IF !USED('mvr')
USE D:\wconnect\data\mvr\mvr.dbf IN 0 SHARED
ENDIF
SELECT mvr
locate
SCAN 
lcRec = STR(RECNO())
WAIT lcRec WINDOW nowait 
lcTag = ALLTRIM(plate_no)
lcString = "C234"
DO case
CASE atcc(lcString,lcTag)>0
?lcTag
ENDCASE 
ENDSCAN
James Harvey, MCP
Memphis Police Department
225 Channel Three DR
Memphis, TN 38103
901 577-1296
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform