i have a question
is it possible to read multiple records and update it to one record?
I have this code and i need to find all records that match my query and put them all in one record
<code>
UPDATE #tmpSearchTable
SET Monday = SchedulerEvents.Title+'<br/>x'
FROM SchedulerRecurrence RIGHT OUTER JOIN
SchedulerEvents ON SchedulerRecurrence.EventID = SchedulerEvents.EventID
WHERE DATEPART(hour, SchedulerEvents.StartTime) = DATEPART(hour, @DateTime)
AND DATEPART(minute, SchedulerEvents.StartTime) = DATEPART(minute, @DateTime)
AND SchedulerRecurrence.weekDays=2
AND #tmpSearchTable.Timi=@DateTime
AND EventType=@Company
OR
DATEPART(hour, SchedulerEvents.StartTime) = DATEPART(hour, @DateTime)
AND DATEPART(minute, SchedulerEvents.StartTime) = DATEPART(minute, @DateTime)
AND dbo.GetWeekdayNames(SchedulerRecurrence.weekDays) like '%Monday%'
AND #tmpSearchTable.Timi=@DateTime
AND EventType=@Company
END
</code>
Best regards Hlynur
is it possible to read multiple records and update it to one record?
I have this code and i need to find all records that match my query and put them all in one record
<code>
UPDATE #tmpSearchTable
SET Monday = SchedulerEvents.Title+'<br/>x'
FROM SchedulerRecurrence RIGHT OUTER JOIN
SchedulerEvents ON SchedulerRecurrence.EventID = SchedulerEvents.EventID
WHERE DATEPART(hour, SchedulerEvents.StartTime) = DATEPART(hour, @DateTime)
AND DATEPART(minute, SchedulerEvents.StartTime) = DATEPART(minute, @DateTime)
AND SchedulerRecurrence.weekDays=2
AND #tmpSearchTable.Timi=@DateTime
AND EventType=@Company
OR
DATEPART(hour, SchedulerEvents.StartTime) = DATEPART(hour, @DateTime)
AND DATEPART(minute, SchedulerEvents.StartTime) = DATEPART(minute, @DateTime)
AND dbo.GetWeekdayNames(SchedulerRecurrence.weekDays) like '%Monday%'
AND #tmpSearchTable.Timi=@DateTime
AND EventType=@Company
END
</code>
Best regards Hlynur