Arithmetic overflow[resolved]
Here's one for you guys.
I had this sp.....
Code:
CREATE PROCEDURE spVisitors AS
select convert(varchar,(getdate()-(day(getdate())-1)),101) as startdate, convert(varchar,getdate(),101) as enddate,
sum([count]) as visits, sum(qcount) as requests, pid
from tblcounterv3
where (convert(varchar,cast(countdate as datetime),101) between convert(varchar,(getdate()-(day(getdate())-1)),101)
and convert(varchar,getdate(),101))
group by pid
GO
which worked fine until I set the default language settings on my server from English US to English UK.
Now I get this error :
Server: Msg 8115, Level 16, State 2, Procedure spVisitors, Line 3
Arithmetic overflow error converting expression to data type datetime.
Any ideas?
:eek2:
Re: Arithmetic overflow[resolved]
Yeah, but they weren't unnecessary when I originally wrote the query, just after I changed the settings!
:thumb: