Friday, August 17, 2007

Jeff McWherter speaks at

Chris Woodruff was scheduled to speak at our .net user group last night. Unfortunately he came down with the flue. Luckily Jeff, one of our program directors, stepped up and gave a presentation on Optimizing and Performance Tuning your Applications.

Jeff has a cool website where you can do a bit of stalking to see what TV shows he is going to record, and if he is at home (based on if his laptop is on the network or not).

We had 17 members attend and everyone won a prize!

Thursday, August 16, 2007

Inagural Flint branch of Meeting

We had 10 members attend our inagural Flint branch meeting yesterday. Paul Kimmel presented on Visual Studio 2008. His presentation was very technical and interactive. The smaller audience size allowed us to ask questions and prompted discussions. If you are interested in some of the new features in Visual Studio 2008 have a look at Paul's blog.

Friday, August 10, 2007

SQL Server random number generator

This SQL Script generates a random number between 1 and 5.

It demonstrates a few interesting ideas:
1) Temporary tables - These are in memory temporary tables (I use these all the time)
2) SQL Server looping with While (you may use these instead of cursors. I've heard cursors are slower)
3) Random number generation with newid() (select top 5 * from [table] order by newid() returns 5 random rows.

declare @tempTable table (column1 int) --declaring a temporary table
declare @i int
set @i =1
While @i <=1000000 begin insert into @temptable (column1) select abs(cast(cast(newid() as varbinary) as int))%5+1 set @i = @i +1 end

--select * from @temptable

select column1 as [value],count(*) as [Occurrences],
cast(count(*)*100 / cast((select count(*) from @temptable) as decimal) as int) as [Percentage] from @temptable
group by column1