What are the challenges you face when working across database platforms? Take the survey

"Value was either too large or too small for an Int64" error

aboykoaboyko Posts: 3
edited May 17, 2005 9:56AM in SQL Compare Previous Versions

I'm getting the subj error on extremum values for decimal(28,0) primary keys. Any help would be appreciated - I really needed this working about an hour ago :)

SQL Compare v.




  • Options
    Just realized that my previous post is incomplete:

    Here is an example of what SQL Compare refuses to believe:

    CREATE TABLE TableDecIdentity1 (
    identity_col decimal(28, 0) IDENTITY (-9999999999999999999999999000, 1) NOT NULL

    Thanks again,

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello Alex,

    I don't think that there is anything that we can do to help short of very extensive modifications to the software. The precision and scale for an identity field need to fit into a 64-bit space, because the largest numeric datatype in the .NET Framework is an Int64. That gives 18446744073709551616 possible values which is too few for the number that you've set. This isn't a problem for SQL Server, apparently, because it does a clever trick of storing the number as a series of bytes, apparently.
This discussion has been closed.