No Picture

Auto generate SQL audit tables and database triggers

November 28, 2012 Matt Thornton 0

One approach to monitoring version history of items in SQL tables is to use an _Audit table version with database triggers. However, the creation and maintenance of the tables and triggers can be time consuming. This post provided a nice script to automate the creation but unfortunately it suffered a […]

No Picture

Can’t alter server principal ‘dbo’

June 3, 2011 Matt Thornton 0

If you’ve encountered anything like this problem, then you may have had to update the permissions that a specific SQL login has. However, if the user you’re trying to edit is mapped to dbo, then you’re not allowed to make changes. There are ways to do it, but you need […]

No Picture

Quick tip: Use OVER to get row numbers in subsets

December 10, 2010 Matt Thornton 0

Consider the following. You have a set of data. Within the data are multiple subsets that share an identifier. WIthin your main set, you need to number the subsets for each item within it, e.g., Data ID SubsetID Name Lots more columns… ———- ———– 1 ABC Dave 2 DEF Trev […]