Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The best way to use a portion of a field for indexing
Message
From
10/01/2005 16:06:01
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
The best way to use a portion of a field for indexing
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00975802
Message ID:
00975802
Views:
68
I have a uniqueindex made like FAI2005-000001. It is based on the year the record was input. When a new record is added I need the last unique id plus 1. My SQL statement I use is:

Select faiuniqueid From fai_required Where Val(SubStr(faiuniqueid,4,4)) = Year(Date()) InTo Cursor myFAIlist

This sql statement runs very slow on our older computers. Is there a way to do this different to make it faster?
Next
Reply
Map
View

Click here to load this message in the networking platform