2013-06-28 34 views
0
Msg 102, Level 15, State 1, Line 3 
Incorrect syntax near ' '. 

我就在這上面的錯誤:最簡單的更新語句在''附近失敗?

update activity 
set scheduledforuseridy=557 
  where datecompleted is null  
  and dateexpired is null  
  and scheduledforuseridy in (719,745,402)  
  and communityidy=4 

我在做什麼錯?這個錯誤是什麼意思?

+3

表上的任何觸發器? –

+0

你如何運行查詢? 'go'命令不是SQL,它只能在SQL Server Management Studio中使用。 – Guffa

+0

@Guffa謝謝你擺脫它的清晰度 –

回答

-1

你的更新語句中沒有「',這意味着,當你更新表活動時,你的某個觸發器被觸發。您可以通過運行以下查詢來檢查表中是否存在觸發器

select O.name as TableName,T.name as triggerName 
from sys.triggers T 
JOIN sys.objects O 
ON T.object_id = O.object_id 
and O.name = 'activity'