October 11, 2002 at 4:30 pm
I have created a simple view which combines 4 fields from one table with 4 identically corresponding fields from another table- A Union Query made into a view. The problem is, I can't do updates in the view. IS there a way to make this possible?
October 11, 2002 at 5:50 pm
Partitioned View is the solution you are looking for. With partitioned view, The original table is replaced with several smaller member tables and each table stores a horizontal slice of the original table based on a range of key values. The range is enforced by a CHECK constraint on the partitioning column, and ranges cannot overlap. Those member tables are combined into a partitioned view using the UNION ALL statement.
In order to create updatable partitioned views, many rules have to be followed during the creation of view. See BOL for details.
October 14, 2002 at 8:53 am
Alternatively, check out "INSTEAD OF" triggers. You can place these on views - even views that are not partitioned views - and they will operate on INSERT, UPDATE, or DELETE statements, allowing you to specify how to map those statements back to the tables underlying the view.
Matthew Burr
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply