Re: ORDER BY in VIEW not working
- From: "David Portas" <REMOVE_BEFORE_REPLYING_dportas@xxxxxxx>
- Date: 25 Jan 2006 08:30:23 -0800
Beowulf wrote:
> So, it's just a coincidence (or perhaps luck) that in other views (see
> below) the ORDER BY is respected and the rows returned by the view are
> sorted in the specified order?
>
You could call it luck, yes. SQL Server 2000 usually seems to respect
the order defined in the view, even though there is no formal guarantee
that it always will. SQL Server 2005 added some engine improvements
that seem to make it less likely that the view order will be preserved
- no problem as long as you observe the documented convention that a
SELECT without ORDER BY is unordered.
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--
.
- Follow-Ups:
- Re: ORDER BY in VIEW not working
- From: Beowulf
- Re: ORDER BY in VIEW not working
- References:
- ORDER BY in VIEW not working
- From: Beowulf
- Re: ORDER BY in VIEW not working
- From: David Portas
- Re: ORDER BY in VIEW not working
- From: Beowulf
- ORDER BY in VIEW not working
- Prev by Date: SQL Server does not exist or access denied
- Next by Date: Re: Outer Join problem
- Previous by thread: Re: ORDER BY in VIEW not working
- Next by thread: Re: ORDER BY in VIEW not working
- Index(es):
Relevant Pages
|