Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Working with Views

Author  Topic 

jbezanson
Starting Member

35 Posts

Posted - 2006-05-30 : 09:28:03
Is it possible after a view is created to insert into that view and have it update the related tables??? Or must I update the related tables seperately to have the new records show in the view?

Justin Bezanson

jbezanson@spatterdesign.ca
www.aspnetguy.com

Kristen
Test

22859 Posts

Posted - 2006-05-30 : 09:40:45
If the view relates to a single table, or the update does, then you should be OK.

If its more complicated than that you can set up an INSTEAD OF TRIGGER that will be run INSTEAD of the insert/update, and you can have that insert/update the appropriate tables.

Kristen
Go to Top of Page

jbezanson
Starting Member

35 Posts

Posted - 2006-05-30 : 09:47:12
okay, thanks! :)

Justin Bezanson

jbezanson@spatterdesign.ca
www.aspnetguy.com
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-05-30 : 09:50:12
However, if any of the Tables in the VIEW have computed columns then IIRC I think that all bets are off - UNLESS you use an Instead Of trigger.

Kristen
Go to Top of Page
   

- Advertisement -