Archives: May 2013
A couple of months ago I talked about moving a login from one server to another without the password. The basis behind this is creating the login using the hashed version of the password. Using the same idea we can also “back up” a password.
The first thing to… Read more
I’ve had CROSS APPLY on the mind recently. You could probably tell since its been the subject of my last two posts. Since it’s been on my mind a lot I started to wonder if I could use it to solve some problems I’ve run across in the past. In… Read more
Earlier this week I posted The many uses of CROSS APPLY and I’m quite glad I did. I’ve been working on a series of audit queries for the last couple of weeks and got thrown a bit of a curve today. The original specs included several comparisons against a date.… Read more
Over the last few years of studying SQL I’ve noticed 4 different uses for the command CROSS APPLY.
In the first use I ever saw, and certainly the one I see the most commonly, CROSS APPLY is used to run a function for each row of the query. This is… Read more
So I was studying for the 70-451 and ended up reading the BOL entry for CREATE SCHEMA. I honestly can’t remember why, but what I do remember is thinking “CREATE SCHEMA can do what?!?!?” but with maybe a few more exclamation points.
Now I had always thought that CREATE SCHEMA… Read more
In the same vein as Steve Jones’ series on Customizing SSMS this is a fairly basic trick, but one that not everyone appears to know.
A fairly standard layout of SSMS looks like this.
If you drill down, to say the table list, you can left-click and drag a table… Read more
I was looking for a way to put BOL on my Kindle when I found a few good links I thought I would share. FYI If anyone knows how to put BOL on an Android device it would be great!
Did you know that the GO command isn’t really part of T-SQL? It’s what’s called a batch separator. And in case you were wondering that’s why you can’t put GO inside of stored procedures, functions etc.
So what does the “batch separator do? Well, it separates batches of course. Working… Read more
I was reading through Stackoverflow today and saw an interesting question. SQL inner join vs subquery. The user was comparing 3 queries and wondered why the first took significantly longer than the other 2.
Here are the queries:
Query 1: SELECT * From TabA INNER JOIN TabB on TabA.Id=TabB.Id…
So I am now an MCITP Database Developer for SQL 2008. This is a big milestone for me. A few years ago I was terrified to take any of the exams. They are expensive, and I just knew there was no way I was going to pass. It would be… Read more