开发者

To track the changes in a view on daily basis [closed]

开发者 https://www.devze.com 2023-04-05 06:53 出处:网络
Closed. This question needs details or clarity. It is not currently accepting answers. 开发者_如何学Python
Closed. This question needs details or clarity. It is not currently accepting answers.
开发者_如何学Python

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 9 years ago.

Improve this question

How could I get the changes (data) in a view between a certain period of time. Changes like new rows, updated rows or deleted rows. I am making a stored proc which has to detect the changes in a huge view and then sync them with another table on daily basis. I dont want to to scan all rows when I know the changed rows will be less than 1% daily.

Thanks.


The view is going to change when the underlying data changes. You need to detect changes in the columns in the tables that are in the view - you will probably need triggers on that column that will fire a stored procedure that reconstructs the SELECT query the view is using, and then update the other table as necessary.

0

精彩评论

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