Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Copying a signature column to another record

I have an update SQL Business rule that updates a collection of rows in the after phase. It fires and copies all the columns except my signature column. Yet the same query copies all the columns when executed in SSMS.

The following is my query in the SQL business rule:

WITH cte
AS (SELECT TOP (1000) sessionAttendanceId,
signature,
signatureDate,
attended
FROM [SessionCourseAttendance] s
WHERE attended = 1
AND s.sessionId = @sessionid)
UPDATE SessionCourseAttendance
SET
signature = cte.signature,
signatureDate = cte.signatureDate,
attended = cte.attended
FROM SessionCourseAttendance sca
JOIN cte ON cte.employeeId = sca.employeeId
WHERE sca.employeeId = cte.[employeeId]
AND sca.attended IS NULL
AND sca.sessionId = @sessionid;

I suspect there is a config setting or the like that I've missed. Suggestions?
1 person has
this question
+1
Reply