How to get list of sequential dates in MS SQL Transact SQL and cursors alternative

Databases

Let’s imagine that we have table where we store some service prices and that this price can vary regarding period of the year. You would then have something like this in your table: $50 from January 1st to May 31th $70 from June 1st to October 31th $60 from November 1st to December 31th What we want is to get all daily prices for given date region. So, if we give range from May 15th to 15th June we want to get this: May 15th $50 May 16th $50 May…read more