SQL SERVER – A Puzzle – Fun with NULL – Fix Error 8117

During my 8 years of career, I have been involved in many interviews. Quite often, I act as the interview. If I am the interviewer, I ask many questions – from easy questions to difficult ones. When I am the interviewee, I frequently get an opportunity to ask the interviewer some questions back. Regardless of the my capacity in attending the interview, I always make it a point to ask the interviewer at least one question. Let’s learn how to fix Error 8117.

Read More

SQL SERVER – Quiz and Video – Introduction to Hierarchical Query using a Recursive CTE

This is followed up a blog post of my earlier blog post on the same subject – Introduction to Hierarchical Query using a Recursive CTE – A Primer. In the article we discussed various basic terminology of the CTE. The article further covers following important concepts of common table expression. Let us learn in this video how to do Hierarchical Query using a Recursive CTE.
What is a Common Table Expression (CTE)
Building a Recursive CTE
Identify the Anchor and Recursive Query
Add the Anchor and Recursive query to a CTE
Add an expression to track hierarchical level
Add a self-referencing INNER JOIN statement

Read More