November 1, 2010 at 7:53 am
Hi All.
I have view with 3 tables inner joined,
While I Bulk update with data , I have to Write three queries for
three Different Tables,
So am trying to update with help View
but that Gives the below error
View or function 'Table_name' is not updatable because the modification affects multiple base tables.
If I Update with View particulary one table columns Its updating fine..
But i need to Update all columns but View doesn't support.
Is ther any alternative solutions... update the multiple table with single query
Thanks in advance...
Please dont give any URL help, I cant access the net outside of SQLserverCentral.com
November 1, 2010 at 8:17 am
afaik, updates will only work if you target a single tables columns.
Workaround ?
Prepare your action
Perform the update targeting single tables
If you need that in transaction scope, just use begin tran before your first update statement and "commit tran / rollback tran" once your work has finished or failed.
If that update elaps takes to much time, prepare your direct updates using staging tables.
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
November 3, 2010 at 8:16 am
hi
it is possible by using triggers on views create trigger and in that insert values from individually
suppose
trigger on the view like emp_dept_salgrade
in that trigger split that result and like individual result like insert into emp, dept, sal table then it is possible by using this .
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply