Something is slightly off here:Update tblIncidentsset tblIncidents.IncidentPlatoon = (select tblKDTestShift.ShiftFrom (select IncidentID, convert(nvarchar(10),IncidentDate,101) as IncidentDate, IncidentDispatchedTime, (DateDiff(d,'01/01/2003', tblIncidents.IncidentDate) + (case When (tblIncidents.IncidentDispatchedTime >= '080000') then '1' else '0'end )) %24 as DayNumFrom tblIncidents) a left outer join tblKdTestShifton tblKDTestShift.DayNumber = a.DayNum where tblIncidents.incidentID = a.incidentid and tblIncidents.IncidentDispatchedTime is not null and tblIncidents.IncidentDispatchedTime <> ' 'and tblIncidents.IncidentPlatoon is null)
I am not sure if this works, but it should point you in the right direction:Update tblIncidentsset tblIncidents.IncidentPlatoon = tblKDTestShift.Shift FROM(select IncidentID, convert(nvarchar(10),IncidentDate,101) as IncidentDate, IncidentDispatchedTime, (DateDiff(d,'01/01/2003', tblIncidents.IncidentDate) + (case When (tblIncidents.IncidentDispatchedTime >= '080000') then '1' else '0'end )) %24 as DayNumFrom tblIncidents) a left outer join tblKdTestShifton tblKDTestShift.DayNumber = a.DayNum (Type Of Join) JOIN tblIncidents.incidentID = a.incidentid WHERE tblIncidents.IncidentDispatchedTime is not null and tblIncidents.IncidentDispatchedTime <> ' 'and tblIncidents.IncidentPlatoon is null
Sarah Berger MCSD