Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Non-Exact IN?
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Non-Exact IN?
Miscellaneous
Thread ID:
00912678
Message ID:
00912678
Views:
55
I hope I'm missing something obvious here ...

I need to select records based upon 5-digit zips from a subquery, so I could use left(cZip,5) in (...), but this isn't going to optimize without a special index. Is there a way to make the comparison non-exact? Some SET ANSII OFF (ala VFP) type setting?

Is the best option to build a long "WHERE cZip Like '99999%' OR czip Like '99998%' OR ..." or maybe build some complex pattern string for a single LIKE comparison.
Next
Reply
Map
View

Click here to load this message in the networking platform