Archives: October 2013
There are lots of ways to learn new things, or be reminded of old things. One of my favorites is the QotD on sql server central. Recently there was an interesting question on defaults. It pointed out that there is a difference between adding a column with a… Read more
It’s one of those things that always aggravated me but not really enough to complain about. When you run a query to grid in SSMS then copy and paste the value to a query window it stripped the carriage return/line feed.
-- Setup code CREATE TABLE GridTest (String varchar(50)) GO…
Yes I’m talking about FETCH as in a cursor, yes everyone hates cursors. But you know cursors are like anything else. It’s good to know everything you can and they do have their place. In fact there are two very specific places that I see cursors.
First: You need to… Read more
Everyone knows that we should include comments in our code right? On the other hand the vast majority of us don’t use them as much as we should, myself included. Believe it or not I actually got a job based on the comments I had put into the tech test.… Read more
We have a set of databases at my office that use the load and swap method of loading data with minimal effect on the users. In case you haven’t heard of this before if you have a table that is modified during a batch process only (no user writes at… Read more
Personally I’ve always enjoyed learning the T-SQL for any given task. The GUI is usually pretty easy to figure out but I’ve found that for standard tasks it can be quite a bit faster to just use a script. In fact I posted a while back on using the script… Read more
This happens to me all the time. I get a request from a developer to overwrite the test copy of a database with the production copy. Typically this is so they can use real data for testing although there are other reasons.
So first I go around to everyone who… Read more
It’s time for T-SQL Tuesday again and this time Kendal Van Dyke is asking for Your Best SQL Server SWAG. This is my first T-SQL Tuesday, not from lack of interest or knowledge, but to be honest mostly because I can’t seem to remember when the second Tuesday of the… Read more
Both TOP and SET ROWCOUNT are both valid methods of limiting the result sets from a query. They are however very different commands. The TOP clause of a command limits that single command, while the SET ROWCOUNT command limits all eligible queries within the connection until another SET ROWCOUNT is… Read more
I absolutely love learning new tricks that can be done in SSMS. Everything from opening initial connections to both the object explorer and a query window to changing the font that the query windows use. Recently I learned a new one while watching a SQL Skills Insider video. I’ve… Read more