Join vs Sub Query
If you work with SQL Server you will eventually encounter a JOIN statement. This JOIN statement can be stated as an ordinary JOIN, or as a sub select. In most cases I try to use JOINS (even though it’s...
View ArticleSQL Joins – The Differences
In SQL Server you can find several joins. In this post I will try to explain the diffences between them, and how you can use them in your advantage. Joins There are several different types of joins....
View ArticleCalculating Running Totals
When you work with data and database systems, eventually you need to calculate running totals on (for example) product sales or financial data. There are several methods to calculate these amounts. In...
View ArticleAre nested Inserts possible?
Two weeks ago I got an interesting questions. Two of my colleagues thought of a funny way to tease me, by asking me this question: If we have an insert into table X, can we nest another insert into the...
View ArticleT-SQL Tuesday #37 – Join me in a Month of Joins
T-SQL Tuesday is a recurring blog party, that is started by Adam Machanic (Blog | @AdamMachanic). Each month a blog will host the party, and everyone that want’s to can write a blog about a specific...
View Article