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
 Transact-SQL (2000)
 update using a view ???

Author  Topic 

gpiva
Starting Member

47 Posts

Posted - 2004-12-01 : 23:43:49
is possible to run an update on a view that is composed by two dirrent tables ?

any help appreciate.


el

Hippi
Yak Posting Veteran

63 Posts

Posted - 2004-12-02 : 01:21:16
Definitely, as long as you update 1 table at a time
Go to Top of Page

gpiva
Starting Member

47 Posts

Posted - 2004-12-02 : 01:44:39
Thank you.

quote:
Originally posted by Hippi

Definitely, as long as you update 1 table at a time

Go to Top of Page

venkatarajan
Starting Member

6 Posts

Posted - 2004-12-02 : 07:03:04
Hai,
You can update the view but you have to careful when updating. As the rule of updation says that
1). It should not contain any functions
2). Group by clause should not be used for creating that view

Regards,
Venkatarajan

Expect the Worst,
Hope for the Best
Go to Top of Page

venkatarajan
Starting Member

6 Posts

Posted - 2004-12-02 : 07:03:58
Hai,
You can update the view but you have to careful when updating. As the rule of updation says that
1). It should not contain any functions
2). Group by clause should not be used for creating that view

Regards,
Venkatarajan

Expect the Worst,
Hope for the Best
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2004-12-02 : 13:27:51
You can put an INSTEAD OF trigger on a View if it violates the rules allowing a view to be updateable - and then use the Trigger to actually do the update (including updating two tables etc. if necessary)

Kristen
Go to Top of Page
   

- Advertisement -