Wednesday, November 19, 2014

View from the top

A quick rant about SQL Server. I was designing a view the other day and decided that I want the default select on the view to be in a certain order. I use that view in turn inside another view using a Union All statement.

In my first view I add in a SELECT statement like this: SELECT fielda, fieldb, fieldc FROM tablename ORDER BY fieldc, fielda. Now, in a regular select statement this gives me the results I want. Everything neatly arranged the way I want it. However, when I try to save the view I get an error message that says "Warning: The ORDER BY clause is used only to determine the rows that are returned by the TOP clause in the view definition. The ORDER BY clause does not guarantee ordered results when the view is queried, unless ORDER BY is also specified in the query itself." Wait, what?!?!? The sole purpose for using a view is to view the data. Why can't I have the default view of the data ordered before the view is passed on to the end user? I realize that I can rewrite my select statement to create a temporary table, insert everything I need into that table using a select from, order by statement and then do a select all from that table and then I have to dispose of the temporary table.

That seems like an awful lot of overhead just to order my output results.

Wednesday, November 12, 2014

Cloudy with a chance of distress

Do we really need everything to be in the cloud? Don't get me wrong, I like the idea of cloud computing. All your stuff available anywhere; it's a neat concept. But it's gotten to the point where everyone wants you to signup for their online account. Case in point, I recently installed Windows 10 Enterprise on a test computer. Part way through the install process you have to enter a Microsoft ID. Mind you, this is an enterprise edition. I had a similar experience setting up Windows RT on a Surface tablet, but at least that OS is designed for a single end user, not a faceless cubicle.

I'm hoping that this requirement is only for the preview release, but if Microsoft thinks IT techs are going to create a Microsoft ID for every user on a corporate network, then their head is in the clouds.

As Jennifer Lawrence can attest, nothing stored in the cloud is 100% safe. For that matter neither is anything on a network, but at least on a company network you can control the points of entry. Forcing the IT departments to create accounts is a surefire way to improve Linux's market share.