Some useful Transact-SQL procedures and functions.