Finding Recurring Dates in MSSQL using HAVING

Recently, I automated a manual billing process for recurring invoices. In order to batch process the job, I decided to use a stored procedure that gets the billing details for all recurring invoices by date.

MSSQL date functions DATEADD, DATEDIFF and DATEPART take some getting used to, but are well documented and (once understood) made the query nice and light. What I missed was the fact that not all months are created equal.

[More]

Comments
BlogCFC was created by Raymond Camden. This blog is running version 5.9. Contact Blog Owner