Here is another Number of Days in the Month function for SQL Server without the use of Case or if statements. It uses the DATEPART and DATEADD built-in functions.
Write Reports from SQL to Disk (Even HTML!)
Ever need to write reports out to a folder? I have found that creating output files are SA-WEET! (and easy too) The sample script uses BCP to create an HTML file.This process works well for reports that need to be generated nightly and take too long to run in real time. Use an SMTP mail […]