Yea for the scroll bar!

February 25, 2008

One of the things that irked me about Integration Services (BIDS) is that the Execute SQL Task didn’t have a scroll bar for the SQL Text.  If you had a long piece of SQL, the only way to scroll was to use your cursor and arrow keys.  How annoying.

This has been fixed in 2008 (Katmai).

Yea!

SQL Task Scroll Bar

Advertisements

SELECT 1 VS Select *

February 7, 2008

Connor Cunningham has a great explanation of the difference between using SELECT 1 versus SELECT * in an EXISTS clause.  I’d like to add that I’m assuming that the same rule would apply to SELECT count(*) and SELECT count(1).

SQL Query Optimizer would expand * into the column list and then figure out that none of them are needed.  So theoretically, SELECT count(1) would be a little faster in putting the plan together, but would run at the same speed and have the same IOs as SELECT count(*).


Top Few per Group – Using T-SQL

February 2, 2008

Ever needed to get the most recent 2 transactions for every customer in a list using a T-SQL statement?  This sounds like an easy task, but upon further examination the query is a little harder than it seems.  One solution, a very ugly solution I might add, would be to cursor through all the customers and run a select statement with an order by clause to get the most recent transactions.  I bet there are other possible solutions, but they all seem to take multiple passes.  A lot of people hate continued posts, but this one is kind of long so I’m going to do just that.  Sorry for the click-through.  I’m not making money on ad pageviews!  🙂

Read the rest of this entry »


Katmai (SQL 2008) IntelliSense

February 2, 2008

I wanted to put up a sample of what IntelliSense looks like it Katmai:

IntelliSense

(Click on the image for full size)

This is a feature that we have all been hearing about and has finally arrived with Katmai.

I can see how this is going to be very helpful for developer productivity since developers will be prompted with the names of databases, tables, and columns without having to use the Object Explorer.

By the way – I’m using Windows Live Writer to compose this post.  I used it in the first version and this new version is very nice.  I think I’ll be using it from now on.  It facilitates creating more complex and better looking posts.  Very cool.