Re: ORDER BY in View and ADP Form

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



you're right

im disagreeing with that David Portas

why should everything be a sproc, david? i mean-- please tell us
please enlighten us

OH YEAH
I forgot.. Microsoft finds BEANER RETARDS TO BE MVPs. ANYONE
ENLIGHTENED WITH SQL ISNT ELIGIBLE FOR ACCESS MVP.

WHY DOES EVERY ACCESS MVP DIPSHIT IN THE WORLD NOT UNDERSTAND THE
CONCEPT OF ADP?

Why aren't there any MVPs-- the people with the credibility to work for
*CHANGE* that PUSH MICROSOFT TO REMAIN COMMITTED TO ADP?

bunch of god-damn WUSSES
lose the training wheels




Baz wrote:
I don't think it's me you are disagreeing with (for once).

<aaron.kempf@xxxxxxxxx> wrote in message
news:1158272975.295804.190770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
i disagree keep everything in a view unless it MUST be in a sproc

for starters; views allow you to use 'Analysis services'

try building a cube based off of a sproc lol




Baz wrote:
Or you could just set the RecordSource to:

SELECT * FROM vwPatientInformation ORDER BY LastName, FirstName,
MiddleName

<imani_technology_spam@xxxxxxxxx> wrote in message
news:1158179665.283300.10830@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
This form is for data entry. Will the user be able to modify, insert,
or delete records if the form is based on a stored procedure instead
of
a view?

David Portas wrote:
imani_technology_spam@xxxxxxxxx wrote:
When I open up a form in an Access ADP to access this view, the
rows
are not sorted. I am using MS Access 2003 and MS SQL Server 2005.
Is
there a reason why the rows are not sorted? Here is the code I
used:

CREATE VIEW [dbo].[vwPatientInformation]
AS
SELECT TOP (100) PERCENT LastName, MiddleName, FirstName, Suffix,
DOB,
MedicalRecordNumber, Prefix
FROM dbo.Patients
ORDER BY LastName, FirstName, MiddleName


Views have no fixed ordering in SQL Server. In that respect a view
behaves exactly like a table. The sort order returned by a query
against a view is undefined unless you specify ORDER BY in the query
(not the view).

The TOP 100 PERCENT modifier in your view does nothing useful so I
recommend you remove it and put your query in a stored procedure
instead. Access also gives you the option of doing the sorting
client-side, which is probably not desirable unless the result set
is
reasonably small.

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



.



Relevant Pages

  • Re: ORDER BY in View and ADP Form
    ... So you are admitting now that Microsoft is NOT committed to ADP's. ... im disagreeing with that David Portas ... WHY DOES EVERY ACCESS MVP DIPSHIT IN THE WORLD NOT UNDERSTAND THE ... Views have no fixed ordering in SQL Server. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Select command with multiple tables
    ... it becomes difficult to write each and every field in the query. ... David Portas, SQL Server MVP ... State what version of SQL Server you are using and specify the content ... will it be inefficient to use select * from .. ...
    (comp.databases.ms-sqlserver)
  • Re: Select command with multiple tables
    ... is slow because it requires extra work by the server to retrieve the ... David Portas, SQL Server MVP ... State what version of SQL Server you are using and specify the content ... A user needs a few more fields in the database and adds them to a table ...
    (comp.databases.ms-sqlserver)
  • Re: New bie question about NULL
    ... > key (personId, measureName) ... > Pro SQL Server 2000 Database Design - ... > "Peter" wrote in message ... >>> David Portas ...
    (microsoft.public.sqlserver.programming)