Ask a questionAsk a question
 

AnswerSSMA conversion issue

  • Wednesday, November 04, 2009 8:28 PMgypsydavi Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I am using SSMA to convert a Oracle 9i database to SQL 2005. I get the Decimals scale value must be between 0 and 28 inclusive error on several tables. I have tried changing the FLoat data type to numeric with precision and scale but it doesnt help. I have data that looks like -0.00000000000023445 which I believe is causing the problem.

Answers

  • Thursday, November 05, 2009 4:03 AMMelissa Suciadi Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    it because float is Approximate-number data types for use with floating point numeric data. Floating point data is approximate; therefore, not all values in the data type range can be represented exactly.

    float

    - 1.79E+308 to -2.23E-308, 0 and 2.23E-308 to 1.79E+308

    Depends on the value of n

    http://msdn.microsoft.com/en-us/library/ms173773.aspx

    and as mention by c_shah use decimal

    decimal [ ( p [ , s ] ) ] and numeric [ ( p [ , s ] ) ]

    Fixed precision and scale numbers. When maximum precision is used, valid values are from - 10^38 +1 through 10^38 - 1. The ISO synonyms for decimal are dec and dec( p , s ) . numeric is functionally equivalent to decimal .

    http://msdn.microsoft.com/en-us/library/ms187746.aspx

    Best Regards,
    Melissa Suciadi


    If you have found this post helpful, please click the 'Vote as Helpful' link (the green triangle and number on the top-left).

    If this post answers your question, click the 'Mark As Answered' link below. It helps others who experience the same issue in future to find the solution.

All Replies

  • Thursday, November 05, 2009 2:59 AMChirag_Shah Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    >>I have tried changing the FLoat data type to numeric with precision and scale but it doesnt help.

    Just a thought,

    You will have to use FLOAT instead of DECIMAL in SQL Server.

    the following works in SQL

    declare @d as float
    set @d = -0.00000000000023445
    print @d

    OR you can trasfer those values as varchar from ORACLE to SQL and convert them back to Floating numbers inside SQL

  • Thursday, November 05, 2009 4:03 AMMelissa Suciadi Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    it because float is Approximate-number data types for use with floating point numeric data. Floating point data is approximate; therefore, not all values in the data type range can be represented exactly.

    float

    - 1.79E+308 to -2.23E-308, 0 and 2.23E-308 to 1.79E+308

    Depends on the value of n

    http://msdn.microsoft.com/en-us/library/ms173773.aspx

    and as mention by c_shah use decimal

    decimal [ ( p [ , s ] ) ] and numeric [ ( p [ , s ] ) ]

    Fixed precision and scale numbers. When maximum precision is used, valid values are from - 10^38 +1 through 10^38 - 1. The ISO synonyms for decimal are dec and dec( p , s ) . numeric is functionally equivalent to decimal .

    http://msdn.microsoft.com/en-us/library/ms187746.aspx

    Best Regards,
    Melissa Suciadi


    If you have found this post helpful, please click the 'Vote as Helpful' link (the green triangle and number on the top-left).

    If this post answers your question, click the 'Mark As Answered' link below. It helps others who experience the same issue in future to find the solution.