Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Incremental search on numeric
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00774073
Message ID:
00774476
Views:
14
Tracy,

You're welcome.

>Thank you Sergey,
>
>Your method may just be the shortest code available.
>
>Tracy
>
>>Hi Tracy,
>>
>>It could be slow if your table is big. I would rather use SEEK()
>>CREATE TABLE SORTTEST (SKNO N(4))
>>INSERT INTO SORTTEST VALUES (250)
>>INSERT INTO SORTTEST VALUES (350)
>>INSERT INTO SORTTEST VALUES (6300)
>>INSERT INTO SORTTEST VALUES (650)
>>INSERT INTO SORTTEST VALUES (60)
>>INDEX ON SKNO TAG SKNO
>>INDEX ON STR(SKNO,4) TAG SKNOZ
>>INDEX ON PADR(TRANSFORM(SKNO),4) TAG SKNOA
>>
>>** When I need to do an incremental search.
>>nUserinput = 6
>>
>>SET ORDER TO sknoZ
>>= SEEK(STR(nUserinput, 4)) ;
>>		OR SEEK(STR(nUserinput, 3)) ;
>>		OR SEEK(STR(nUserinput, 2)) ;
>>		OR SEEK(STR(nUserinput, 1))
>>		
>>SET ORDER TO sknoA		
>>
>>
>>>Here's a thought how much speed loss do you think I would get with this.
>><snip>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform