Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug? Index Transform(numfld) tag numa
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00774473
Message ID:
00774480
Vues:
17
Tracy,

You should take closer look at the code I posted in another thread. Specificly to the line
INDEX ON PADR(TRANSFORM(SKNO),4) TAG SKNOA
You've to pad character expression index key to the size you want it to be otherwise it may get truncated. For your code it should be
Index On PADR(Transform(numfld),4) tag numflda
>I seem to have a problem.
>
>
>Create Cursor IndexBug (numfld n(4))
>Insert Into IndexBug Values (350)
>Insert Into IndexBug Values (250)
>Insert Into IndexBug Values (650)
>Insert Into IndexBug Values (6300)
>ViewContents("Original Contents")
>Index On Transform(numfld) tag numflda
>Set Order To 1
>ViewContents("TransForm(numfld)-Expected Order")
>Delete Tag All
>Index On numfld tag numfld
>Index On Transform(numfld) tag numflda
>Set Order To 2
>ViewContents("With 2 indexes-The order isn't correct")
>Reindex
>ViewContents("ReIndexed-Short is before long")
>
>Use In IndexBug
>
>Procedure ViewContents (cHeader)
>Select IndexBug
>cMessage = ""
>Scan All
>   cMessage = cMessage + Transform(numfld) + Chr(13)
>EndScan
>MessageBox(cMessage,0,cHeader)
>EndProc
>
>
>How far off am I? I can reproduce this affect in VFP6SP5 and VFP8.
>
>Tracy
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform