[dba-SQLServer] Updatable Views with more than one base table.

Stoker, Kenneth E Kenneth.Stoker at pnl.gov
Thu Feb 26 11:43:35 CST 2004


Everyone,

I read this in BOL:
Updatable views can modify more than one table involved in the view. The
DELETE, INSERT, and UPDATE statements can reference a view as long as
SQL Server can translate the user's update request unambiguously to
updates in the base tables referenced in the view's definition. 

I have a view that is derived from one table with the exception that a
couple of the fields in the view are derived from sub-queries.  The
values in derived from the sub-queries should not be updated, but it is
desired that all other columns in the view be updatable.  As it is now,
all fields are not updatable.  How can I make the view update the one
table?  Can I not use sub-queries to derive those values?  Do any of you
have examples of updatable views with multiple tables that you can
share?  BOL doesn't have much here that I can find, although I will keep
looking.

Thanks.


Ken Stoker
Technology Commercialization
Information Systems Administrator
PH: (509) 375-3758
FAX: (509) 375-6731
E-mail:  Kenneth.Stoker at pnl.gov 




More information about the dba-SQLServer mailing list