Hi
In below code i am getting error
UPDATE [SessionDeliveryParticipant]
SET Attendance = CASE
WHEN (
SELECT COUNT(*)
FROM [SessionDeliveryParticipant] AS sub
WHERE sub.SessionDeliveryCalendarID = SessionDeliveryCalendarID
AND sub.PresentInSession = 0
) = COUNT(*) THEN 1
ELSE 0
END;
Thanks
Ramco RamcoPosted Jun 24, 2023, 4:20 AM
Hi Tuhi
In Design mode where i can write this code in column. I want Attendance column should get automatically updated
Thanks
Tuhin PaulPosted Jun 23, 2023, 5:25 PM
In this modified code, I added [SessionDeliveryParticipant]. as a prefix to the SessionDeliveryCalendarID column to clarify the table reference. Check that the column is referenced correctly in both the inner and outer queries. Please note that the code assumes you have a table named SessionDeliveryParticipant with columns named SessionDeliveryCalendarID, Attendance, and PresentInSession.