Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filtering character in a query
Message
From
01/03/2011 00:00:11
 
 
To
28/02/2011 22:23:42
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01502169
Message ID:
01502180
Views:
42
Actually, unless I misunderstood your original question, both syntaxes should generate the same results

But on the optimization, you're right, mine only does an index scan, whereas the one Naomi gave ( LIKE 'S[_]SH%' ) does an index seek and is better. I have a test table with 27 million names, mine took 1.5 seconds, Naomi's took .4 seconds.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform