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 |
tshaw20832
Starting Member
10 Posts |
Posted - 2014-05-09 : 13:34:59
|
All,I have a view that was created by my predecessor. The was created by another view. I need to add a column but when I do and then execute the view, no data comes across. When I remove the column, the data is populated again. The views name is .dbo.viewname_vw as a. I cant find the view in the database. Any ideas. |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2014-05-09 : 14:06:06
|
views from views (...from views) is not really a good design in my opinion. Better to have each view directly use the underlying tables. But make sure you recompile all dependent views. And make sure to use explicit column lists rather than "select *".Be One with the OptimizerTG |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2014-05-09 : 16:10:37
|
Views don't automatically know about changes to the underlying objects. You may want to lookup sp_RefreshView in BOL and see if it could solve the problem. It forces the view to get re-compiled which causes any dependent objects to get re-evaluated.===============================================================================“Opportunity is missed by most people because it is dressed in overalls and looks like work.” -T.A.Edison |
|
|
|
|
|