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 […]

String or Binary Data would be Truncated

By Greg No comments

  If you’ve every tried to import data into SQL from another source, or even if you’ve just tried to insert data from a user, odds are you’ve hit ths annoying string or binary data would be truncated error message. I hit it at my first full time job, trying to insert data into SQL […]

How does a Left Join affect an Inner Join

By Greg No comments

Knowing the difference between join types is a very important part of querying a database. The two main joins that I use each day are INNER and LEFT. INNER join means get me everything from table A that has a matching row in table B. LEFT means get me everything from table A and if […]