Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index on VarChar field
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01459589
Message ID:
01459592
Vues:
82
This message has been marked as the solution to the initial question of the thread.
Hi Nick,

Im' not sure if is bug, but you can use this way
INDEX ON LOWER(PADR(cSubject,30)) TAG cNormSub

SELECT * FROM Test WHERE LOWER(PADR(cSubject,30)) = "abc"
MartinaJ

>I seem to be experiencing index problems with a VarChar field, has anyone else ever encountered similar behaviour with this field type.
>
>
>CREATE TABLE Test ( ;
>	iTimeId I PRIMARY KEY, ;
>	nParentId I, ;
>	cSubject V(80), ;
>	)
>ALTER TABLE Test
>INDEX ON DELETED() TAG Deleted
>INDEX ON LOWER(LEFT(cSubject,30)) TAG cNormSub
>
>
>Then run
>
>SELECT * FROM Test WHERE LOWER(LEFT(cSubject,30)) = "abc"
>
>Which not only returns records beginning 'abc' but also includes those where cSubject is blank! From what I can establish issuing a REINDEX appears to cure the problem.
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform