Friday, March 09, 2007

How do I use a variable in a TOP clause in SQL Server?

http://sqlserver2000.databases.aspfaq.com/how-do-i-use-a-variable-in-a-top-clause-in-sql-server.html

I have a web page that runs a script which is so slow that it will time out if the number of records is too great. The temporary solution is to split the records into two subsets and then process those sets seperately. Doing that manually was not too big of a deal, but I wanted a better way.

I calculate the number of rows / 2.
Then I needed to use that value to automatically split the set. The only thing I needed to change was the brackets around the variable. So it turned out to be this:

Select top (@myvar) from mytable.

The article goes way more into depth

Sunday, March 04, 2007

Dell Latitude D820

I am just one month shy of the 3rd birthday of my existing laptop, a Dell inspiron 8600. It still runs ok, but takes forever to boot up and is slow enough that I knew I needed to get a new one.

So, I ordered a Dell Latitude D820 that arrived last thursday on Mar 1. I love this computer. Of course it was a huge upgrade from the 3 year old laptop It replaced. It has Windows Vista Business on it, 2 gig of ram, 15.4 in monitor and I added a port replicator to it.

I am testing the waters with this machine to be a desktop replacement. I don't know how it will work but I would love to be able to sit down anywhere and be just as productive as I am sitting at my desk in the office. With our recent subscription to google apps, and buying a dedicated hosted server, we are really trying to go in a direction that supports remote users.

We really don't buy anything but dell and I have always been very pleased with the equipment we have received from them. This laptop is no exception. It is screaming fast and I am loving it. I have installed most of the essential software that I use and it handles it all no problem and still is fast.

David Mineer
Windows Vista

I purchased a dell latitude D820 that arrived last thursday on March 1(more on the new computer later). It came with Windows Vista Business. I thought I would share some of my first impressions about Microsofts new operating system.

I like it. It is intuitive and just seems to click for me. I haven't had too much trouble finding my way around. This laptop is awesome so of course speed doesn't seem to be a problem. The start menu is probably what has given me the most grief, but after I figured out that I could find what I was looking for simply by searching, that has been ok. I still need to take some time and figure out the start menu without searching.

Searching seems to be greatly improved in vista. Most programs have run ok, but there are a few that won't.

Overall I am impressed. The more I understand it the more It will be ok. I am not sure but I think I am using the upgraded "Halo" version and it is visually appealing and everything seems to flow pretty smoothly.