INDEX ON PADR(TRANSFORM(SKNO),4) TAG SKNOAYou'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 >>