This repository contains code samples for Microsoft's SQL Server.
- gaps_and_islands.sql
- SQL gaps and islands in sequences
- lag_and_lead.sql
- Simulate the functions lag() and lead() using outer apply
-
udf_string_split.sql
- A table-valued function that splits a string into rows of substrings, based on a specified separator character.
-
udf_string_to_characters
- A table-valued function that splits a string into rows of single characters
-
clr_string_split.sql
-
-
clr_regex_match
-
- usp_truncated_columns.sql
- A procedure to identify which column is causing the infamous error message "String or binary data would be truncated"