Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Very complicated index expression
Message
 
 
To
16/01/2002 11:37:52
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00605398
Message ID:
00605440
Views:
16
>>>> Also here is another potential problem, if index expression becomes longer than 255 chars...
>>>
>>>More exactly, longer than 240 bytes.
>>
>>Hi Alexander,
>>
>>Thanks for your response. Actually I meant not the result of the indexing (it would be 29 chars in my case), but the index expression itself. However, I've tried this new expression right now and it worked just fine. It surely looks complex :)
>>
>>
>>index on ;
>>town+UPPER(PADR(TRIM(IIF(AT("=",OWNER1,2)>0,SUBSTR(OWNER1, ;
>>AT("=",OWNER1)+1,AT("=",OWNER1,2)-AT("=",OWNER1)-1),SUBSTR(OWNER1,AT("=",OWNER1)+1)))+ ;
>>IIF(AT("=",OWNER1)>0,LEFT(OWNER1,AT("=",OWNER1)-1),""),25)) tag name1
>
>
>It wouldn't be a problem to use getfname(), getlname() etc UDF or this complex expressions if you're sure this schema doesn't get you into trouble :
>
>owner1 = "sammy b=iron"
>owner1 = "ammy b=irons"
>
>Names are fictitious of course but I don't know a combination might exist or not in US names. Keeping the separators sounds to be a better idea to me.
>Cetin
So, you're suggesting to add a space between last name and first name and probably use padr(26) then. That's a good suggestion, thanks. Other than that, I think, this complicated expression is better, than UDFs anyway
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform