Tag Archives: sql statements
-
The MERGE statement doesn’t have a WHERE clause.
5September 30, 2013 by Kenneth Fisher
What the heck? Even indexes have WHERE clauses these days. I can’t remember what I was reading when I saw …
Continue reading -
Detaching a database
1September 26, 2013 by Kenneth Fisher
In my general quest to figure out the T-SQL to do common GUI tasks I did some browsing through BOL …
Continue reading -
DBA Myths: You can’t use an alias in a DELETE statement
3September 24, 2013 by Kenneth Fisher
Recently I wrote about the myth that you can’t use an alias in an UPDATE statement. You can of course, …
Continue reading -
DBA Myths: You can’t use an alias in an UPDATE statement.
4September 16, 2013 by Kenneth Fisher
I’ve found a very common belief among users of T-SQL (both DBAs and Developers) is that you can’t use an …
Continue reading -
A T-SQL query to get current job activity
30September 5, 2013 by Kenneth Fisher
I recently had the task of collecting job activity for the purposes of turning it into a report for some …
Continue reading -
Lots of ways to UNPIVOT a table
Leave a commentAugust 21, 2013 by Kenneth Fisher
I recently read an awesome post on http://www.stackexchange.com questioning how to change columns to rows ie UNPIVOT. One answer demonstrated …
Continue reading -
Database Permissions Queries
3August 5, 2013 by Kenneth Fisher
Over the last year of blogging my thoughts and queries I’ve discovered something interesting. I posted Where is my Backup? …
Continue reading -
Notes on debugging Database Mail problems
10July 29, 2013 by Kenneth Fisher
I’ve had to debug database mail problems several times over the last year or so. Below is a collection of …
Continue reading -
Scripting a partitioned table or index, a caution.
14July 15, 2013 by Kenneth Fisher
I was researching a problem with a partitioned table that had somehow become unpartitioned and discovered something rather interesting. First …
Continue reading -
Writing Dynamic SQL (A how to)
6July 1, 2013 by Kenneth Fisher
A little while back I wrote Best practice recommendations for writing Dynamic SQL where I made a number of suggestions …
Continue reading





