Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Too slow
Message
From
30/11/1999 14:07:27
 
 
To
30/11/1999 13:58:57
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00297016
Message ID:
00297043
Views:
34
>Ed,
>
>If I use Scan For AllTrim(maindatatable.dmdrno) = AllTrim(This.Value)
>Then if I type in 850 it gives me the first record that dmdrno starts with 850 even though this is not a complete drawing number. How can this be avioded and is this the best approach?

Don't ALLTRIM() either - it also is not optimizable, because you probably don't have an index on the ALLTRIM() of the field. How is the field dmdrno stored in the table? If it's stored as a right justified 8 byte character field, try:
SCAN FOR maindatatable.dmdrno == PADL(This.Value,8)
If it's stored in some other way, you'll have to figure out how to make This.Value match up with the field as far as justification and size.

To get best advantage from Rushmore, you want the table expressions in the FOR clause to match the index expression form used in the indexes in the .CDX exactly.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform