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 RickW on 03/08/06 06:59

>>You probably don't want the DBMS to sort unless the order finds it's
way to the top.

Definitely.

What I thought you were setting up was this:

View A could specify an Order By clause, but it would not guarantee an
ordered result set.

Then View B could either SELECT x, y, z... FROM A and not invoke the
ordering in the result set or SELECT x, y, z...FROM A ORDER BY
_ORDER_OF_A_, and that would force the result set to return ordered by
the specification in View A.

I think the "SELECT * FROM V ORDER BY ORDER OF V => C1 ASCENDING" view
is what I'm calling View B, the second one that's needed in order to
invoke the ordering.

I was thinking my suggestion would avoid needing B to force the
ordering.

For you is the thing I call View B a query from outside the database
tool, such as a SQL statement passed in from a client, like in the
example you pointed to with your link to the 4 techniques?


Science is organized common sense where many a beautiful theory was
killed by an ugly fact. -- Thomas Huxley

*** 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

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