General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
The best way to use a portion of a field for indexing
Environment versions
Network:
Windows 2000 Server
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only