Here's a number of SQL scripts, functions, and stored procedures for automating and/or improving daily tasks.