Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to change the TOP function for multiple views

Author  Topic 

pras2007
Posting Yak Master

216 Posts

Posted - 2009-05-21 : 21:34:12
Hello All,

I need to change the “TOP (100) PERCENT “ function to “TOP (2147483647)” function for all my views. Does anybody know how I can alter all my views programmically all at once? Please advice. Thanks.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-05-21 : 21:47:11
why do you need the TOP in your view in the first place ?

You should use the TOP clause and ORDER BY on the query that selecting on the view not in the View query itself.


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-05-22 : 01:06:09
I doubt that View has Order by Clause
Can you post one of the script of Views?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -