Posted by SQL Enthusiast
Article by our editor
CHARINDEX provides an easy way to search for the first occurrence of a string in another string. By reversing the order of the string it can also provide a straightforward way of finding the last occurrence of a string. This can be used in conjunction with the RIGHT function to extract the part of a string that is after the last occurrence of a given delimiter
Comments (5) • Read full article »
SQL Server provides a lot of information in the Data Management Views (DMVs). This script shows how to identify indexes which are never actually used, by using DMVs such as dm_db_index_usage_stats and dm_db_index_operational_stats.
Comments (1) • Read full article »
More SQL questions »