You are here: Re: ORDER BY in VIEW not working « MsSQL Server « IT news, forums, messages
Re: ORDER BY in VIEW not working

Posted by Herb Caudill on 03/21/06 01:15

Thanks to everyone who posted to this very informative thread. I agree
with RickW that this is a very annoying change in SQL Server's behavior.
Microsoft has a reputation for being very careful of protecting
backwards compatibility by not changing software behavior that
developers have come to rely on, whether that behavior was documented or
not. At the very least this should be included in the migration white
paper as an issue to look out for.

To the SQL theorists and purists: SQL Server is a tool that is being
effectively used by a lot of people for a lot of different purposes.
Some of these people aren't Ph.D.s; some of them have (gasp) no formal
training at all. Not every organization has a professional DBMA to do
database architecture for them, and they shouldn't be required to.

Take me: I am a web developer. I use SQL server to store content for
small websites. I'm 100% self-taught, and my company is in no danger of
failing as a result, thank you very much. I don't give a rat's ass about
query optimization or performance; CPU cycles are cheap and my datasets
are small. I want to push my grouping/selecting/ordering logic into SQL
as much as possible; so for instance I might create a base view that
selects out content that is approved to display on the website and puts
it in the correct order, and then create other views that select subsets
of that view for specific pages, perhaps performing joins or what have
you along the way. This way the select & sort logic lives in one place,
and if it changes I only have to change it once. This might turn Mr.
Celko's hair green because it won't scale to a dataset with ten million
records, or because it violates some aspect of relational set theory
that he learned in RDBMS class - but it worked fine for my purposes.

Now, because ivory-tower purists like Celko apparently won an internal
debate at Microsoft, I'm going to have to either (1) take the same
sorting logic and reproduce it fifteen different places, because my SQL
code can't be relied on to return ordered data; or (2) rewrite the .NET
objects that talk to my database so that they use stored procedures
instead of views. Terrific. You guys win.



*** Sent via Developersdex http://www.developersdex.com ***

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация