Tag Archives: T-SQL
-
How do I tell the stored procedure name from inside the stored procedure?
1April 24, 2013 by Kenneth Fisher
I’ve occasionally had the problem of trying to put “smart” logging messages into a process. You know the ones, you’re …
Continue reading -
Calculating the length of a string (Len vs DataLength)
3April 14, 2013 by Kenneth Fisher
This one is basic but still something that can catch you unawares if you aren’t careful. Most DBAs and developers …
Continue reading -
How do I use a variable in an IN clause?
16April 8, 2013 by Kenneth Fisher
I see this question in one form or another a lot. I’ve seen this or something like it probably half …
Continue reading -
UNPIVOT a table using CROSS APPLY
23April 1, 2013 by Kenneth Fisher
I generally spend part of each day looking through http://www.stackoverflow.com, http://dba.stackexchange.com or http://www.sqlservercentral.com. I read through questions that have already …
Continue reading -
The STUFF function
17March 14, 2013 by Kenneth Fisher
While I was at the 2011 Pass Summit I was given the following piece of code to create a comma …
Continue reading -
Insert multiple values sets into a table in one command
8February 28, 2013 by Kenneth Fisher
The INSERT command has two distinct ways to load data into a table. And Both of these are very handy …
Continue reading -
DROP and CREATE vs ALTER
25February 25, 2013 by Kenneth Fisher
When writing a script to change a piece of code, say a stored procedure or view, there are 3 basic …
Continue reading -
Something to watch out for when using sp_rename on Stored Procedures, Functions and Views
6February 11, 2013 by Kenneth Fisher
For those who don’t know, the stored procedure sp_rename allows you to change the name of a user-created object. Basically …
Continue reading





