开发者

Batch View updates

I want to load a bunch of view definitions into SQL Server 2005 & 2008. I am using IF/ELSE logic to dynamically building Create or Alter statements th开发者_JAVA百科at I then EXEC. This works fine. However, unless I get the order of the statements correct, I get errors if a view is dependent on another view that would be created in a later statement. Is there a way to turn of the valiation of the SQL statements until after they have all been entered? It seems like the worst of both worlds. SQL Server does late binding and so it won't propogate changes to tables and views, but you can't create a view without all the pieces being in place.


No, you have to execute all statements in the right order, there's no way around that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜