Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indexing
Message
From
28/12/2000 12:10:39
 
 
To
28/12/2000 00:47:57
Rahul Murarka
Sys-Con Engineering
Kolkata, India
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00457244
Message ID:
00457388
Views:
23
>Dear Sir,
>
>Regards & Hello
>
>I want to Index on fields after removing unwanted characters . So I have written a function given below. which will remove all unwanted characters and then if the field value becomes Null it will add a space to it and then index on it. SET Procedure to file is also defined but not working.
>
>Help
>Rahul
>
>
>
>
>do form addbkpg.scx
>FUNCTION strindex
>PARAMETER strname
>clnstr=CHRTRAN(UPPER(strname),CHRTRAN(UPPER(strname),"01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ",""),"")
> IF clnstr=""
> clnstr=" "
> endif
>RETURN clnstr
>ENDFUNC

You're going to endup with variable length keys, which will slow performance. If you're trying to upper case the index, why not INDEX ON UPPER(field). THis will have beter results in that the function is internal to VFP and the key will always be fixed length.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform