Tag Archives: sql statements
-
Undocumented functionality in FORMATMESSAGE
2December 9, 2013 by Kenneth Fisher
I was reading a rather interesting post on stackexchange “Why is % a forbidden char in a THROW message?” (which …
Continue reading -
Insert into a table using only default values
4December 4, 2013 by Kenneth Fisher
A while back I talked about the DEFAULT keyword and using it to tell SQL to use the default value …
Continue reading -
Finding active DTS packages
9November 27, 2013 by Kenneth Fisher
DTS is dead, long live SSIS. Way back when SQL 2005 was announced then released DTS was pronounced DOA. SSIS …
Continue reading -
Finding the metadata for a query
2November 25, 2013 by Kenneth Fisher
You know I occasionally find it interesting how I learn new things. I was running through a practice test for …
Continue reading -
A pattern to do beginning of period calculations.
Leave a commentNovember 20, 2013 by Kenneth Fisher
Beginning of period calculations are common things. Rolling month reports, queries to pull everything from last month etc require beginning …
Continue reading -
Adding a column to a table with a default (NULL vs NOT NULL)
4October 30, 2013 by Kenneth Fisher
There are lots of ways to learn new things, or be reminded of old things. One of my favorites is …
Continue reading -
Unexpected truncation in FETCH
Leave a commentOctober 23, 2013 by Kenneth Fisher
Yes I’m talking about FETCH as in a cursor, yes everyone hates cursors. But you know cursors are like anything …
Continue reading -
A look at comments
17October 21, 2013 by Kenneth Fisher
Everyone knows that we should include comments in our code right? On the other hand the vast majority of us …
Continue reading -
Query to compare indexes between two tables
Leave a commentOctober 16, 2013 by Kenneth Fisher
We have a set of databases at my office that use the load and swap method of loading data with …
Continue reading -
Use TOP instead of SET ROWCOUNT
13October 7, 2013 by Kenneth Fisher
Both TOP and SET ROWCOUNT are both valid methods of limiting the result sets from a query. They are however …
Continue reading





