|
Posted by Serge Rielau on 03/07/06 08:26
RickW wrote:
> The plain fact is that SQL Server is a tool. Nothing more. It is a
> compromise to allow a stored procedure to return an ordered set, unless
> the hallowed standard being referred to in other posts has somewhere in
> it an exception for SQL-Server-specific objects such as stored
> procedures.
A procedure returns a _resultset_, a view and a table function are
_derived_tables_.
A _resultset_ (typically processed by a cursor) is an interface to the
procedural language while a _derived_table_ is part of the transitive
closure of SQL. (table in => table out)
May I ask what's so bad about placing the ORDER BY in the cursors
selecting from the view? Can't be any harder than replacing the queries
with stored procedure invocations and allows the app to customize the
order to its needs, so if you want to display, order it. If all you want
is move the data around: don't and save the DBMS some CPU cycles.
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Navigation:
[Reply to this message]
|