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 2008 Forums
 Transact-SQL (2008)
 update within joins

Author  Topic 

acoward
Starting Member

1 Post

Posted - 2011-06-16 : 18:39:53
I've been battling this all week, I have three tables
Workorder, multiassetlocci, and ssgravitymain (ssgravitymain is a synonym from a table in a linked database)

Here are the involved fields

ssgravitymain.assetnum
ssgravitymain.lastdate

workorder.wonum
workorder.changedate
workorder.classstructureid

multiassetlocci.wonum
multiassetlocci.assetnum

I need to create a sql job to routinely update ssgravitymain.lastdate with max(workorder.changedate) where workorder.classstructureid = 'some value' and ssgravitymain.assetnum=multiassetlocci.assetnum and workorder.wonum=multiassetlocci.wonum

I keep getting this error

Msg 414, Level 16, State 1, Line 1
UPDATE is not allowed because the statement updates view "ssgravitymain" which participates in a join and has an INSTEAD OF UPDATE trigger.

Can someone please help me, I'm lost?

Allen

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2011-06-17 : 12:05:54
so what have you tried that throws up this error? show us your code ?

If you don't have the passion to help people, you have no passion
Go to Top of Page
   

- Advertisement -