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.
| Author |
Topic |
|
Joseph Schrag
Starting Member
13 Posts |
Posted - 2010-06-02 : 19:47:07
|
| I have a sql script which creates a view. This view references a table that does not exist when the view is created. So, it throws an error. I am wondering how I can catch the error and allow the view to be created anyway with no error thrown (important). I have tried wrapping it in a try catch, but it seems that is not allowed. I have tried using an if (@@error <> 0) statement, but it doesn't stop the error from being thrown.I just want to prevent the error from being returned at all. I have also found that Oracle has exactly what I want (CREATE FORCE VIEW), but that is not available in SQL Server.Any ideas? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
Joseph Schrag
Starting Member
13 Posts |
Posted - 2010-06-03 : 00:19:18
|
| I think that is the route I will have to end up going. |
 |
|
|
|
|
|