Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server - ORDER BY Syntax Error?
Message
De
20/10/1997 13:09:45
Bob Lucas
The WordWare Agency
Alberta, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00054476
Message ID:
00055562
Vues:
39
>>>>I am attempting to create a view within SQL Server 6.5 (I don't think we added any service packs yet). It is a simple query:
>>>>SELECT * from Building Order by Building_no.
>>>>This returns a syntax error on the Order by statement. Any clues are appreciated. I checked MS KB, Tech Net, Manuals and everything says that this should work... The error message is 156 Incorrect syntax near Order.


From the SQL Server Manuals in the definition of the CREATE VIEW function:

AS select_statement
Is the SELECT statement that defines the view. It can use more than one table and other views. You must have permission to select from the objects referenced in the SELECT clause of a view you are creating.
A view need not be a simple subset of the rows and columns of one particular table. You can create a view using more than one table and/or other views with a SELECT clause of any complexity.
There are, however, a few restrictions on the SELECT clauses in a view definition:
· You cannot include ORDER BY, COMPUTE, or COMPUTE BY clauses.
· You cannot include the INTO keyword.
· You cannot reference a temporary table.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform