Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2008
    Posts
    24

    Unanswered: Arithmetic overflow error

    select Convert(BIGINT,2768964354) & (Convert(BIGINT,0xFFFFFFFF) * Power(convert(bigint, 2),32))

    when executing the above statement i am getting an error like

    "Arithmetic overflow error converting expression to data type bigint"

    if the power value is less than 32 it is coming correctly.

    Thanks in advance
    Kiran

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    See this: http://msdn.microsoft.com/en-us/library/ms187745.aspx

    The upper range of bigint is (2^64) - 1. You are trying to get 2^64.

  3. #3
    Join Date
    Dec 2008
    Posts
    24
    thanks for your reply

    is there anyway that i can store the value in some other datatype like varbinary and do a bitwise AND operation with bigint ?

Posting Permissions

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