After my CTE presentation a while back I was asked many questions, and received several great suggestions from people.   One question was how does the performance compare between a recursive CTE to generate a hierarchical tree path listing and a query using self JOINs and UNION ALL to generate similar results.  To test this I created a simple table …

CTE Hierarchy compared to the alternative Read more »

This is very useful if you are creating many reports based on a single template. To start with when you use the “Add new Item” functionality into a report project, this is all you get.  Report Wizard, Report, and Data Source.  Then searching Online Templates is not very useful.  So how do I add my own SSRS rdl templates. Steps: …

Using your own RDL as a SSRS Template Read more »

This is part 18 “two inner JOINS” of a 19 part series on TSQL Basics. You will first gain an understanding of the differences between each of these types of JOINS, and when they should be used. Then we’ll explore some common uses for JOINS, such as replacing a not in clause with JOIN to get the same results with …

TSQL Basics Part 18: TWO INNER JOINS Read more »

When creating a table you can specify IDENTITY with the following syntax: For example The IDENTITY property is valid for data types of the integer data type category, except for the bit data type, or decimal data type.  So how many rows can you insert into that table?  It depends on the data type used. What happens when I run …

Are you wasting half the capacity of IDENTITY? Read more »

This is part 17 “two full outer JOINS” of a 19 part series on TSQL Basics. You will first gain an understanding of the differences between each of these types of JOINS, and when they should be used. Then we’ll explore some common uses for JOINS, such as replacing a not in clause with JOIN to get the same results …

TSQL Basics Part 17: TWO FULL OUTER JOINS Read more »

This is part 16 of a 19 part series on TSQL Basics. You will first gain an understanding of the differences between each of these types of JOINS, and when they should be used. Then we’ll explore some common uses for JOINS, such as replacing a not in clause with JOIN to get the same results with better performance. You …

TSQL Basics Part 16: EXCEPT INTERSEPT UNION Read more »

Years ago while working on my CTE presentation for a SQL Saturday I added a blog post called “Using a CTE to Split a String Into Rows“, and since that posting I have used it many times. But as things go in development eventually there is a need to do something more. Doing some complex string building to create files …

Using a CTE to Split a String Into Rows with Line Numbers Read more »

This is part 15 “inner and outer JOIN” of a 19 part series on TSQL Basics. You will first gain an understanding of the differences between each of these types of JOINS, and when they should be used. Then we’ll explore some common uses for JOINS, such as replacing a not in clause with JOIN to get the same results …

TSQL Basics Part 15: INNER AND OUTER JOIN – Video Explanation Read more »