I need to subtract a number of business days (1-15 days) from a specific date, for example subtracting 5 business days from 2013-12-27
should return 2013-12-20
, is there an easy way to do that?
This post explains how to do it using a recursive CTE: