Order By in View
In case of view Order By is supported or not ?
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
NarayanRank #8,477 · 221 reputationPosted Nov 22, 2011, 11:08 PM EST
CREATE VIEW [dbo].[View_1]
AS
SELECT TOP (100) PERCENT ID, Name
FROM dbo.Country
ORDER BY Name
Satyapriya NayakRank #47 · 31.5K reputationPosted Nov 22, 2011, 11:08 PM EST
ORDER BY clause is not supported in views .
Please refer the below link
http://blog.sqlauthority.com/2007/08/12/sql-server-fix-error-msg-1033-level-15-state-1-the-order-by-clause-is-invalid-in-views-inline-functions-derived-tables-subqueries-and-common-table-expressions-unless-top-or-for-xml-is-als/
http://stackoverflow.com/questions/1306359/order-by-in-a-sql-server-2008-view
Thanks
VulpesRank #55 · 29.2K reputationPosted Nov 22, 2011, 11:10 PM EST
Arjun PanwarRank #254 · 9.9K reputationPosted Nov 23, 2011, 5:50 PM EST