I'm migrating SQL Server 2000 to SQL Server 2008. I have many views. How do I check each views that if they have an order by clause?
Thanks.
I'm migrating SQL Server 2000 to SQL Server 2008. I have many views. How do I check each views that if they have an order by clause? Thanks. |
||||
If you're asking how to get this information from a SQL Server 2008 installation, then use
or
If you're asking how to get the information from the SQL Server 2000 database, why not backup and restore? Or you can connect to your SQL Server 2000 instance using SSMS, right click on the database, choose "Generate Scripts" and select all objects (or views, or procedures, etc.). |
|||||||||
|
One thing to note that we found when converting one of our projects, if you've used the As a temporary and ugly workaround you can change it to Not sure if there's a solution that you can implement just in the view though. |
|||
|
ORDER BY
clause can stay there, it's just that the behavior of your app may change. You may want to check your app for locations that rely on ordering without an explicitORDER BY
- those will have to be corrected whether you drop theORDER BY
from your views or not... – Aaron Bertrand♦ Jan 7 at 19:14