A CSV import crashed on the date 30/2/2007. Use the ISDATE() function to validate a VARCHAR column in a staging table before moving rows to a DATETIME field.
SQL SERVER – Result of EXP (Exponential) to the POWER of PI – Functions Explained
Quick examples of PI(), POWER() and EXP() in SQL Server, and the answer to the title: EXP to the POWER of PI returns 23.1406926327793.
SQL SERVER – Convert Text to Numbers (Integer) – CAST and CONVERT
How to convert text to integer with CAST and CONVERT, whether they fail on alpha-numeric values (yes), and how to pull only the numbers from a string.
SQL SERVER – Explanation of WITH ENCRYPTION clause for Stored Procedure and User Defined Functions
Use WITH ENCRYPTION to hide the code of a stored procedure or UDF, but keep a copy of the script. Once encrypted, there is no simple way to decrypt it.
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 – Explanation and Comparison of NULLIF and ISNULL
NULLIF returns NULL when two expressions are equal and the first one when they are not. Here is how it compares with ISNULL and the matching CASE expression.







