Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
I have the following update SQLStatement String:SET @SQLStatement ='UPDATE TAB_ccsNetActions SET emailflag = 0 WHERE datediff("d",a.DueDate,getdate()) <= @ContractorDueIn and ModuleName = '''+@ModuleName +''' and MODULERECORDID =' + convert(nvarchar(50), @ModuleID)EXEC (@SQLStatement)I am getting an error, where datediff("d",Incorrect syntax......Thank you very much for your help.