Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create index
Message
From
25/04/2007 07:59:03
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
25/04/2007 07:25:21
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01219687
Message ID:
01219697
Views:
7
>Hi,
>I have a field1(c,10) and I'd like to create an index on it. The field looks like this: "BA12345607", and the index should consist of the last two characters showing the year, and then the six characters from the middle showing the sequential number and the first two letters showing a sequence as well.
>I've tried to join the three together like this,
>
> INDEX ON VAL(SUBSTR(ALLTRIM(field1),9,2)+SUBSTR(ALLTRIM(field1),3,8))+ SUBSTR(ALLTRIM(field1),1,2) TO indx
>
>but it didn't work. Joining the first two is ok. Can I join the three in one anyway?
>
>Thanks
>Tamas

right(field1,2)+substr(field1,3,8)+left(field1,2)

But do you think such an index would be usefull in the long run?
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