I recently had a developer come to me with a “problem”; she said that she issued an UPDATE statement to update few records but the values didn’t change. I found that the UPDATE did take place. The issue was that the column was defined as DECIMAL(8,2), but her update statement was trying to change the… Continue reading Numeric Column Updates/Calculations
Conditional Joins…I don’t see much about this topic in cyberspace, but I occasionally run into performance problems with them. So this posting is all about them…or more specifically about why you should avoid them. A conditional join is a join (either inner or outer, by the way) that contains an “either-or” condition, easily identified because… Continue reading Should I use an “OR” in a JOIN?
Many developers find this topic to be mysterious or confusing. Let’s try to shed some light on this subject. What is a transaction and how is it managed in the database? Why is my connection blocking others (my T-SQL statements completed hours ago)? Simply put, from Microsoft’s .NET website: “A transaction consists of a single… Continue reading SQL Server Transaction Management
What is a SQL Server execution plan? Big topic: I suggest grabbing Grant Fritchey’s book SQL Server Execution Plans (A free eBook at the time of this post); 332 pages of good stuff on execution plans. You can get it here: Redgate link to Fritchey’s eBook So you don’t want to read a whole book… Continue reading Execution Plan Basics
The JOIN clause seems to frequently be a source of mystery/frustration/wonderment for developers, so today I decided provide some information that may demystify it for you. First, a quick definition: a JOIN allows you to retrieve data from 2 (or more) tables based on logical relationships between the tables. A JOIN allows you to retrieve… Continue reading Notes about JOIN
Generally speaking, most T-SQL queries contain WHERE clauses to filter out data and WHERE clauses almost always contain a reference to a column…after all, that’s why the WHERE clause exists (to filter out the data). However, occasionally there is a need to use a condition in a WHERE clause that has no reference to any… Continue reading WHERE Clauses Without Column References
Today I decided to compile a list of tips and tricks for getting more use out of SSMS. I have a favorite set of shortcuts and option settings, and I bet you do as well. But we can all learn something new to help us become better, more efficient developers. There are many articles out… Continue reading Tips and Tricks for SSMS