Hi everyone!
Why does the following select work...
Code:
select
count(distinct l.PID)
from
LocTrackHist l, Serv s
where
l.SID = s.SID and
l.PID = s.PID and
l.currFacID = 'RVH' and
l.currLocID like 'M08%' and
datediff(hh, s.startDtm, getdate()) < 24
but this select fails with the error being "Arithmetic overflow during implicit conversion of VARCHAR value '21/06/2010 3:46:58.116 PM' to a DATETIME field ."
Code:
select
count(distinct l.PID)
from
LocTrackHist l, Serv s
where
l.SID = s.SID and
l.PID = s.PID and
l.currFacID = 'RVH' and
l.currLocID like 'M08%' and
datediff(hh, s.startDtm, '21/06/2010 3:46:58.116 PM') < 24