Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Nasty index, any better ideas?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00817470
Message ID:
00817861
Views:
14
yup, you are correct - that index was no good! well i found a new solution (i think that one works). but looking at your original index, mine is not that much greater <bg> (it also presuposes that there is only 1 letter to left) :
INDEX ON ;
	IIF(!ISALPHA(Fld), ;
		PADL(ALLT(Fld), 4, "0"), ;
		left(ALLT(Fld), 1) + padl(subs(ALLT(Fld), 2), 3, "0") ;
	) TAG Fld
so thining how *slow* that index becames, might be easear to just create a temporary cursor with sql and seperate that field.

>>i don't know if you consider padl() and allt() as less-standard vfp functions (you probably do), but howabout
>>index on iif(!Isalpha(CatNumber), padl(allt(CatNumber), FldLength, "0"), CatNumber) tag CatNumber
>
>Being very rusty and none-too-good even years ago, I've been going through the Access functions to see what I can find. In Access:
>
>LEFT is fine after all. TRIM is also fine. I haven't found a PAD yet, but there's got to be one, I would think. IIF is of course good, that's the only one I knew to begin with.
>
>Anyway: your index is *almost* right, but still has the disorder among the alphas...like B1,B13,B2
Previous
Reply
Map
View

Click here to load this message in the networking platform