Tag Archive for 'calendar'

Say Hello To Partitioned Outer Joins

Add a comment

Recently, I was helping someone to improve a procedure which fills a table with zero where there is no value for some days.
Instead of cursoring and inserting, I wrote a single query using a partitioned outer join to achieve this. Later in the conversation, I was asked to explain how this was working and I posted about. You [...]

How A Monday Became A Sunday

Add a comment

Some weeks ago, one client of mine told me something I found really weird.
He told me that he updated the (weekly) day number of a couple of days to have a good count of working days in the month.
In fact, it was a quick and dirty way to take care of something that went in [...]