Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Easiest way to do this search
Message
From
20/09/2018 17:42:34
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01662162
Message ID:
01662173
Views:
53
Thanks. Not sure what I was missing my first try.


>>I am not sure the fastest way to do this kind of search in sql server, maybe a regular expression?
>>
>>Let's say I have a 6 character varchar field. In that field are license plate nunbers, such as "L1 234", "QA3333", etc. Now the user enters via a telephone 6 numbers. (I cannot control the IVR portion and must deal with the 6 numbers.) Now given the phone pad, if a user enters "235466" that could really mean:
>>235466
>>A35466
>>B35466
>>C35466
>>2A5466
>>2B5466
>>
>>etc for millions of combinations. I need to pull the recordfs that match any of those possibilities.
>>
>>Comments?
>
>
>What do you get when you search using
>
>select * from Licenses where Plate like '[2a-c]%'
>
>? If you get all plates where the value is starting with 2 or letters A, B, C, then this is your answer. Create your pattern this way and you should be good.
Previous
Reply
Map
View

Click here to load this message in the networking platform