Does SQL Server have a SPACE function? Yes. SELECT SPACE(100) returns 100 spaces, and a short example uses it to join last and first names.
SQL SERVER – CASE Statement in ORDER BY Clause – ORDER BY using Variable
Stop building ORDER BY strings and running them with EXEC in a stored procedure. I show how a CASE statement in ORDER BY sorts by a variable without dynamic SQL.
SQL SERVER – Validate Field For DATE datatype using function ISDATE()
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.







