[dba-SQLServer] View not updatable because

jwcolby jwcolby at colbyconsulting.com
Wed Oct 28 11:38:30 CDT 2009


What I have found on GOOGLE is that the FROM clause can only reference a single table.  But if I am 
going to select records by a join, then by definition the where clause will reference more than one 
table.

HELP!!!

TIA.

John W. Colby
www.ColbyConsulting.com


jwcolby wrote:
> I have never figured out how to do the following...
> 
> I have a table which contains records that I need to delete.  I create a view that joins that table 
> to another table on the PKID.  The second table has a set of records which I need to delete out of 
> the first table, then append into the first table.  IOW the matching records in the first table have 
> have been updated and I need to delete them, then append in the updated records.
> 
> I get an error message:
> 
> "view or function MyFunction is not updatable because the modification affects multiple base tables."
> 
> This is a simple view witj two tables, joined on the PKID, all fields selected in the table that 
> needs records updated (deleted), NO fields selected in the second table.
> 
> What am I doing wrong?
> 



More information about the dba-SQLServer mailing list