SQL Tip: LEFT JOINs and WHERE clauses…are they really LEFT JOINs?

There are times when I review SQL queries and find people using LEFT OUTER JOINs but then use WHERE clauses that turn those joins into INNER JOINs. Recently as I mentioned this to someone they reminded me that I should blog about it…so here I am blogging about it. 🙂 First off, if you aren’t…

3

SQL Tip: Return only latest record by date

This was originally created in 2011/2012 in a series I dubbed “SQL Tips” for my team (via email and an internal blog site). I’ve decided to add these SQL Tips to my external blog. These are being posted exactly how they were written ~6 years ago…unless I found someone’s name being called out…I may have…

0

SQL Tip: Create comma seperated string from values in a column (& COALESCE)

This was originally created in 2011/2012 in a series I dubbed “SQL Tips” for my team (via email and an internal blog site). I’ve decided to add these SQL Tips to my external blog. These are being posted exactly how they were written ~6 years ago…unless I found someone’s name being called out…I may have edited…

0

SQL Tip: Returning a portion of a string field – dynamically (CHARINDEX)

This was originally created in 2011/2012 in a series I dubbed “SQL Tips” for my team (via email and an internal blog site). I’ve decided to add these SQL Tips to my external blog. These are being posted exactly how they were written ~6 years ago…unless I found someone’s name being called out…I may have…

0

Hardware Inventory – View to Class/Property Info

Over the past several years I’ve gotten a lot of questions from people about what WMI class is the source of data for a particular hardware inventory view (“v_GS_…”). This past week I created a couple queries to provide a team who has generally been the source of 95% of these questions and I figured…

0

Change Tracking (aka Syscommittab) Issues and Cleanup – Part 1

Replication in Configuration Manager is talked about pretty frequently. It’s a pretty awesome feature, but also a pain at times. One of the reasons I find it to be so cool is that it takes advantage of a SQL feature called Change Tracking. This feature is the fundamental basis for replication – and is a…

0

SQL Tip: Creating a Grand Total (and additional subtotals)

This was originally created in 2011/2012 in a series I dubbed “SQL Tips” for my team (via email and an internal blog site). I’ve decided to add these SQL Tips to my external blog. These are being posted exactly how they were written ~6 years ago…unless I found someone’s name being called out…I may have…

0

SQL Tip: Creating a PIVOT table (Part 2)

This was originally created in 2011/2012 in a series I dubbed “SQL Tips” for my team (via email and an internal blog site). I’ve decided to add these SQL Tips to my external blog. These are being posted exactly how they were written ~6 years ago…unless I found someone’s name being called out…I may have…

0

SQL Tip: Creating a Pivot table via T-SQL

This was originally created in 2011/2012 in a series I dubbed “SQL Tips” for my team (via email and an internal blog site). I’ve decided to add these SQL Tips to my external blog. These are being posted exactly how they were written ~6 years ago…unless I found someone’s name being called out…I may have…

0

SQL Tip: The DENSE and DENSE_RANK Functions

This was originally created in 2011/2012 in a series I dubbed “SQL Tips” for my team (via email and an internal blog site). I’ve decided to add these SQL Tips to my external blog. These are being posted exactly how they were written ~6 years ago…unless I found someone’s name being called out…I may have…

0