Re: ORDER BY in VIEW not working



But stored procedures are a dead end - you can't refer to them in any
other objects. I can't select subsets of the results of a stored
procedure, I can't join against it, I can't count its results without
using cursors (not in SQL, anyway).

So if I replace my base view with a stored procedure, I can't do
anything further with it in SQL, and the client has to do everything.
The .NET code for each section of the website has to request the entire
set of content items, and then choose the ones it wants. That's no good
for two reasons. One, each request is pulling far more data than it
really needs. Two, SQL is far better at selecting subsets than .NET is.

Surely we can do better.

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



Relevant Pages

  • How do I do Paging through a large dataset via Stored Procedures
    ... Paging by dynamically altering the SQL Query ... Create stored procedures ... SELECT * FROM STUDENTS ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Help with Stored Procedure
    ... I did mean stuff like system stored procedures (even ... build the query, compile it, and optimize it, then, then this is less ... very not easy using dynamic sql. ...
    (microsoft.public.sqlserver.programming)
  • Re: choices regarding where to place code - in the database or middle tier
    ... Sure, the DBMS is a good place for simple referential integrity constraints, ... to 4 separately-running-but-pipelined stored procedures, ... A typical user would enact a 100 or so business functions per day. ... own stored procedures' by storing the SQL for every business query in the DBMS ...
    (comp.lang.java.programmer)
  • Re: Serious errors with Create view command
    ... the database is opened? ... There's no database on earth that behaves that way! ... What on EARTH does the option of 'Edit Stored procedures' do? ... I can't paste it INTO the view designer sql view ...
    (microsoft.public.fox.helpwanted)
  • Re: Frage zu View-Tabellen
    ... eigenes Element in SQL. ... wenn man prepared statements statt adhoc statements ... Kompilierung entfällt und der Unterschied im Speicherverbrauch besteht darin, ... der Vorteil von Stored Procedures gegenüber prepared statements liegt ...
    (microsoft.public.de.sqlserver)