Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Incremental search on numeric
Message
De
05/04/2003 13:26:56
Mike Yearwood
Toronto, Ontario, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00774073
Message ID:
00774444
Vues:
13
That would be really slow, compared to SEEK. Cetin has the right idea. Take the user's entry and convert into to the proper value with leading zeros. Do the seek using that value and never show that value to the user.

>Here's a thought how much speed loss do you think I would get with this.
>
>CREATE TABLE SORTTEST (SKNO N(4))
>INSERT INTO SORTTEST VALUES (250)
>INSERT INTO SORTTEST VALUES (350)
>INSERT INTO SORTTEST VALUES (650)
>INSERT INTO SORTTEST VALUES (6300)
>INDEX ON SKNO TAG SKNO
>INDEX ON TRANSFORM(SKNO) TAG SKNOA
>
>** When I need to do an incremental search.
>NUSERINPUT = 6
>SELECT SKNO, RECNO() AS REC_NO ;
>   FROM SORTTEST ;
>   WHERE TRANSFORM(SKNO) = TRANSFORM(NUSERINPUT) ;
>   INTO CURSOR CSR_SEEKTEMP
>IF _TALLY > 0
>   GO CSR_SEEKTEMP.REC_NO IN SORTTEST
>ENDIF
>USE IN SELECT("CSR_SEEKTEMP")
>
>Just looking for some thoughts,
>
>Tracy
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform