Add a carriage return with CHAR(13) and a New Line Feed with CHAR(10) in T-SQL. Handy for formatting output, dynamic SQL with GO, and saving user text.
SQL SERVER – 2005 Collation Explanation and Translation – Part 2
Collation Explanation and Translation, part 2: one query on sys.fn_helpcollations() lists all 1011 collations in SQL Server 2005 with a description of each.
CONCAT_WS: Keep NULL and Empty Strings Separate
CONCAT_WS joins values with a separator, but NULL and empty strings have different effects. These examples keep the original fields beside the combined text and byte length.
REPLACE Return Limits: Cast the Input to max
REPLACE return limits can truncate text at 8,000 bytes. Cast the searched input to max first, then compare Unicode and non-Unicode byte lengths.
SQL SERVER – Repeate String N Times Using String Function REPLICATE
REPLICATE repeats a string N times. I found this T-SQL string function while searching for replication, and it is handy when you need repeated text.
SQL SERVER – 2005 Row Overflow Data Explanation
Is 8060 bytes per row still the limit in SQL Server 2005? Yes, but varchar, nvarchar, varbinary, sql_variant and CLR types are excluded. That is row overflow data.






