Run SQL Query and Email Results

The program below will run a SQL script, convert the results to an HTML table, and email you with it. Everything is passed in via command...