Aug 30, 2011

UNION Vs UNION ALL

This issue came up during one of the training I conducted recently. There is a popular belief that UNION will ALWAYS perform a unique filter on the data.  While it is true that UNION Clause will ALWAYS RETURN unique set of data, filtering operation either sort or distinct select is not guaranteed.
Take this example:


SELECT SalesOrderID, SalesOrderDetailID, OrderQty, ProductID, UnitPrice, UnitPriceDiscount FROM SalesLT.SalesOrderDetail WHERE ProductID = 799
UNION
SELECT SalesOrderID, SalesOrderDetailID, OrderQty, ProductID, UnitPrice, UnitPriceDiscount FROM SalesLT.SalesOrderDetail WHERE ProductID = 989
SELECT SalesOrderID, SalesOrderDetailID, OrderQty, ProductID, UnitPrice, UnitPriceDiscount FROM SalesLT.SalesOrderDetail WHERE ProductID = 799
UNION ALL
SELECT SalesOrderID, SalesOrderDetailID, OrderQty, ProductID, UnitPrice, UnitPriceDiscount FROM SalesLT.SalesOrderDetail WHERE ProductID = 989

Aug 28, 2011

Removing unnecessary files using powershell

Now a days some people (including me) used to save whole heap of files into their hard disks. Word documents, excel sheets, powerpoint presentations, pictures  taken, pictures received from others and white papers (some times they are word documents), code files (including SQL),   Then you have Acrobat reader files, e-books, video and audio files.  Most of them take a lot of space. In addition to it, I also have multiple versions of it.

Aug 24, 2011

Speaking again at SSSLUG

I was scheduled to speak at this user group meeting (That's today.) I am ready with the presentation. However, after having a small hickup on some personal issues, I asked Dinesh Asanka to do it. He too was ready with the presentation, but at our office he got something. He presence was needed at office at that time. So, I am back to square one is doing the presentation.
I am speaking on SQL Server 2008 R2 StreamInsight. This session gives an introduction to Stream Insight.
by the way, we are planning to have live tweets of the session. If you are unable to come please watch the tweets Follow SqlSvrUniverse. 

Aug 11, 2011

Resources on Denali


onYesterday, Microsoft has announced the release of Product Guide v1 for SQL Server Code Name “Denali” Community Technology Preview 3 (CTP3). This is a single download that organizes Denali related content for easier viewing. It is available for download at http://go.microsoft.com/fwlink/?LinkID=225814

The SQL Server Code Name “Denali” CTP3 Product Guide includes useful resources and demos that will help IT Professionals better evaluate of CTP3.  This includes:
-          14 Product Datasheets
-          8 PowerPoint Presentations
-          5 Technical White Papers
-          13 Hands-On Lab Preview Documents
-          6 Click-Through Demonstrations
-          13 Self-Running Demonstrations
-          26 Links to On-Line References
-          44 Links to On-Line Videos including 26 Presentations from North America TechEd 2011
Microsoft also stated that they have a short windows of opportunity to shape the final release, so itmay be one of the rare opportunities to provide feedback on the features, usability and effectiveness. Microsoft expects the customers, communities and organizations to provide feedback on SQL Server CTP3 release in the next 60 days.
More to come, stay tuned.