Capital Area .NET Users Group with Stephen Forte
Visited the Capital Area .net Users Group last night...what fun! Stephen Forte, who's the Regional Director for NY/NJ spoke on Ranking and Windowing functions in SQL Server 2005. No, it wasn't really .net stuff, but it was very cool. His explanation of the new SQL Server 2005 T-SQL enhancement called Common Table Expressions (CTEs) was worth the price of admission alone. In a nutshell, CTEs allow you to effectively dynamically create a view in T-SQL, and then query against it:
USE AdventureWorks GO WITH MyCTE( ListPrice, SellPrice) AS ( SELECT ListPrice, ListPrice * .95 FROM Production.Product ) SELECT * FROM MyCTE GO
The cool thing is that this also allows you to query against results of an aggregated query (or ranked query), something that would be difficult or impossible without the use of the CTE.
Forte is a pretty dynamic speaker, and told some fun stories. It also turned out that he and I were wearing exactly the same type of sandals, both of us having dressed for the 100+ degree heat in Northern Virginia yesterday. Here's a snapshot from my mobile phone. A little grainy, but hopefully will give you the gist:
The slide he's pointing to is his Q&A slide, with a picture apparently from some Congressional hearing. Steve mentioned that he likes to put a little local flavor into his presentations. :-)