Exponential moving averages are similar to weighted moving averages in that they assign less weight to … Exponential moving average in T-SQLRead more
Author: Tomas Lind
Weighted moving average in T-SQL
In an earlier post I demonstrated the calculation of moving averages in T-SQL. However, the there … Weighted moving average in T-SQLRead more
Moving average in T-SQL
A common calculation in trend analysis is the moving (or rolling) average. A moving average is … Moving average in T-SQLRead more
Large Inserts and count(*)
If you insert lots of rows into a table with a clustered index, a SELECT COUNT(*) … Large Inserts and count(*)Read more
Line numbers in t-sql error messages
When you run scripts in SSMS and get an error, the error references a line number … Line numbers in t-sql error messagesRead more
Create or Replace
Blog series: SQL Server Connect Items How many times have you been forced to change a … Create or ReplaceRead more
Rowlock can block more than a row
To avoid the blocking of other users, rowlocks are sometimes used to create locks on the … Rowlock can block more than a rowRead more
Missing comma between columns in select statement
Hopefully, when you make an typing error while writing a SQL statement, you get the red … Missing comma between columns in select statementRead more
Zero footprint Server/Database DDL Trigger
Aaron Bertrand has written a great introduction to server/database DDL triggers in his article SQL Server … Zero footprint Server/Database DDL TriggerRead more