Tag Archive for 'outer join'

TSQL Challenge #11 Using Recursive CTE

Add a comment

Here is my proposal about the TSQL Challenge #11.
Given a product table, and a coupon table, we have to find within one or two coupons which combination gives the best discount, with additional rules :

the discount price can not be less than 70% of the original price
the total amount of the discount can [...]

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 [...]