Results 1 to 8 of 8

Thread: Arithmetic overflow[resolved]

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member thebloke's Avatar
    Join Date
    May 2003
    Posts
    358

    Resolved 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?


    Last edited by thebloke; Sep 23rd, 2005 at 09:38 AM. Reason: resolved
    The Bloke
    www.blokeinthekitchen.com
    making cooking cool for blokes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width