If you use Order By clause while creating SQL View, SQL Server throw you such kind of error
Post Reference: Vikram Aristocratic Elfin Share
The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified.
Sloution: Use Top with Percent keyword while creating view. For example-
Create View
As (Select Top 100 Percent col1, col2, col3 from Table11 order by col1,col2,col3)
No comments:
Post a Comment