Ordered data requires ORDER BY

When you select data out of a database table, it might seem as if the system will give you data in the order of the clustered index that is on that table (assuming it has one), but this isn’t quite right. I showed this in the fifth of my T-SQL tips at TechEd Australia this year. If you don’t explicitly order data using the ORDER BY clause, the system makes no attempt to provide you with the data in any particular order. It will just give you the data in the fastest way possible. You might be lucky and get … Continue reading Ordered data requires ORDER BY

Design Query in Editor bug

Ok, so real database developers don’t use the graphical “Design Query in Editor”… yeah, I know. Sure, there’s the odd time when you’re typing a query and you don’t have an Object Explorer (eg, in SSIS) and a moment of weakness sees you hit “Build Query” to save some typing, but in general I encourage people to write their queries in Management Studio SSMS and then copy them into the SSIS dialog. I was showing someone some of the frustrations I have with the graphical editor, and came across a real beauty – repeated predicates. I logged a bug at … Continue reading Design Query in Editor bug

"No Match Output" in SSIS 2008

The hairy Irishman (his description – I just call him Sacha) is presenting to the Adelaide SQL Server User Group today, talking about improvements in SQL Server 2008 Integration Services. Right now he’s talking about the No Match output of the Lookup Component, and I’m wondering why I had always just accepted that in SQL 2005, rows that didn’t match a lookup would get pumped out to the error output. For those of you who are saying “Sorry, what?”, let me explain… If you have a data flow in Integration Services which is missing a particular piece of information, and … Continue reading "No Match Output" in SSIS 2008