• sgmunson - Thursday, June 14, 2018 10:45 AM

    mcromarty - Thursday, June 14, 2018 9:34 AM

    Thanks for the quick replies. Perfect!

    What Lynn Pettis posted means that performance could be a problem because every time you run the querys posted, your SQL server will have to look at every single row, and the indexes won't help much.   If you have this kind of query running from a web page, you might want to consider creating a computed, persisted column that contains the data without any punctuation, and then index the table on that column, including any other columns that would get selected from that table.

    Which will work as long as the index doesn't exceed 900 bytes clustered or 1700 bytes non clustered (this is posted in a SQL 2017 forum).