November 7, 2011 at 11:49 am
Hi ,
I am trying to copy a view from prod to test , but need to restrict the rows based on a column values. The view already exists on a test. How can this be done?
Thanks
SVR
November 7, 2011 at 11:58 am
It's not clear what you mean. Would the view in test not be more recent and the one you want to work with?
To move a view, you just compile the code on the other environment. If you don't want to drop or overwrite an existing view, use a new name.
To restrict rows, use a WHERE clause. Without more information, that's the best I can do to help you.
November 7, 2011 at 1:14 pm
thanks for your response.
The problem was , got a request for data refresh from prod to test, some of them were views. did not know how to refresh view or even that is possible?
November 7, 2011 at 1:26 pm
SVR (11/7/2011)
thanks for your response.The problem was , got a request for data refresh from prod to test, some of them were views. did not know how to refresh view or even that is possible?
to refresh the view, you have to refresh teh data for the underlying tables of the view; the view is just a saved SQL statement, so you need to get whatever the view referenced in sync with test/prod .
Lowell
November 7, 2011 at 3:49 pm
Lowell is correct. A view is nothing more than a query. If someone wants data refreshed, you need to move the data in the underlying tables.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply