Aggregate Functions in an Update Statement

By Greg 3 comments

I often need to update a record with an aggregate of another table. It’s often a parent record that has a record of the sum of a column in all of it’s child records. It seems like a really simple case of having an update statement and setting the value of the column to the […]

Can you use a case statement as part of a join?

By Greg No comments

I had a question yesterday about whether or not you can use a case statement as part of a join condition. I was pretty sure the answer was yes, but we can always just run a simple test to prove it. It’s a pretty simple test to setup, I’m going to create 2 tables, populate them […]