SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Aug 2004
    Location
    vi
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Gettin Arithmetic Error with query

    I am gettin this Error, from my SQL query below, what am I missing:

    Arithmetic overflow error converting numeric to data type numeric

    Code:
    SELECT     FullUrl AS SiteUrl, CAST(CAST(CAST(DiskUsed AS decimal(10, 2)) / 1024 AS decimal(10, 2)) / 1024 AS Decimal(10, 2)) AS 'Total Size in MB'
    FROM         Sites
    WHERE     (FullUrl LIKE '%sites%') AND (FullUrl <> 'MySite') AND (FullUrl <> 'personal')

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    what's with the triple cast?
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast

  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,251
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    what is the current datatype of the DiskUsed column?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

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