Posted By: SlackmasterK | May 8th @ 12:54 PM
page 1 of 1
Comments: 3 | Views: 726
So I have a view that someone else wrote - Which queries other views, and so forth, eventually querying a series of tables, in a grossly overcomplicated series of events that should have been one table.

Anyway, when one of the tables (Let's call it 'structures') updates, the view should update, but doesn't.  When I open the structures table in Sql Server Management Studio, the view updates immediately, as it should have done when I first queried the view.

Any idea what would cause this behavior, or how to cause the view to refresh manually?
SlackmasterK wrote:
So I have a view that someone else wrote - Which queries other views, and so forth, eventually querying a series of tables, in a grossly overcomplicated series of events that should have been one table.

Anyway, when one of the tables (Let's call it 'structures') updates, the view should update, but doesn't.  When I open the structures table in Sql Server Management Studio, the view updates immediately, as it should have done when I first queried the view.

Any idea what would cause this behavior, or how to cause the view to refresh manually?


are you talking about chnages to data in rows not showing up or chnages to the structure of a table ?

SlackmasterK wrote:

figuerres wrote: are you talking about chnages to data in rows not showing up or chnages to the structure of a table ?


Changes to the structure... Specifically, one column's name being changed.

The part that bugs me the most is that the view changes... after I open the table... But not if I just query it from an app.


views are a little bit like stored procedures, I think they store the plan and use that when they run... 

if the views are selecting * and not the names of columns perhaps you can dump each of them into a text file and have an "update this mess" proc?

just a set of  alter View [def here] then a "go" then the next view.

get them in order so that the later ones refer to ones already updated...

then you can run that sproc when you make a change.
page 1 of 1
Comments: 3 | Views: 726