Tag Archives: T-SQL
-
Generating scripts for previous versions of SQL
1October 21, 2015 by Kenneth Fisher
I make a habit of using the latest version of SSMS even if I’m not working with the latest version …
Continue reading -
Working with “special” names
4October 19, 2015 by Kenneth Fisher
What do you do when you need to use a special character in a name? Well, I guess I should …
Continue reading -
Updating a view
2September 30, 2015 by Kenneth Fisher
I was recently asked how to update views. Specifically the question was about using triggers to update a view. So …
Continue reading -
“sql_handle” is not a recognized table hints option.
Leave a commentSeptember 23, 2015 by Kenneth Fisher
I’ve you’ve run a query similar to the following: And gotten an error similar to: Msg 321, Level 15, State …
Continue reading -
Using @@ROWCOUNT can be a bit tricky
3September 16, 2015 by Kenneth Fisher
@@ROWCOUNT is a very useful system variable that returns the number of rows read/affected by the previous statement. It’s frequently …
Continue reading -
Finding the worst running query in a stored procedure
14September 10, 2015 by Kenneth Fisher
The other day I was asked to tune a stored procedure. Not exactly an uncommon task, but I worked something …
Continue reading -
Pulling data from the error log
8August 17, 2015 by Kenneth Fisher
The other day I was asked to pull a list of errors from the SQL Server log into a table …
Continue reading -
Getting and storing a high precision datetime
5August 13, 2015 by Kenneth Fisher
Earlier today I was working on a project where I was recording some time stamps. In order to get as …
Continue reading -
A pattern to match correctly on a value or a NULL
3August 5, 2015 by Kenneth Fisher
As you may have noticed if you read my blog I learn a lot from trolling various forums. In this …
Continue reading -
Filtered Index restrictions and Kendra Little’s Index Quiz
3July 20, 2015 by Kenneth Fisher
A few weeks ago I saw a tweet about Kendra Little’s (b/t) new SQL Server Quizzes. Of course I had …
Continue reading





