Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you index on an extension of the file name?
Message
From
14/04/1998 12:52:25
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
14/04/1998 12:37:22
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00091812
Message ID:
00091829
Views:
22
>>>I want to index on the last three letters of a file name
>>>and get a list indexed by file extension.
>>
>>Firstly, you shuld collect file names/extensions into cursor (using ADIR()). Then you can index your cursor and use it for list.
>---
>Hi Ed and thanks...
>I have a table with files name in it.
>I want to index on the extensions.
>I am looking for the index code.. example
>index on surstr(fieldname,right(filedname,3)) to myindex - or something
>like that...
Try :
index on upper(substr(fieldname,rat(".",filedname)+1))) to myindex
Beware this one assumes all have extensions.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform