Arithmetic overflow error converting numeric data to data type numeric

  • Dear Sir,

    I am in great trouble, I have a table which contain two fields my table structure is

    ColumnName DataType

    ProductId Char(5)

    Rate Decimal(8,2)

    I am inserting data like here

    ProductID Rate

    P0001 10000.00

    it's giving above error. i am stunned why the error is giving.

  • I suppose you can use nvarchar as a datatype that would solve your problem...

  • deba_20032004 (11/28/2012)


    Dear Sir,

    I am in great trouble, I have a table which contain two fields my table structure is

    ColumnName DataType

    ProductId Char(5)

    Rate Decimal(8,2)

    I am inserting data like here

    ProductID Rate

    P0001 10000.00

    it's giving above error. i am stunned why the error is giving.

    By your description, this is what you're doing: -

    CREATE TABLE #yourSampleTable (ProductId CHAR(5), Rate DECIMAL(8,2));

    INSERT INTO #yourSampleTable(ProductId,Rate)

    SELECT 'P0001', 10000.00;

    Of course, executing the above gives no error, so I'm inclined to believe that you have missed out on some vital information for us to help to solve your issue. Please read through this article[/url], which describes the best way to give sample data and DDL scripts. Then come back when you have a script that reproduces the error that you are experiencing.

    Thanks.


    Forever trying to learn
    My blog - http://www.cadavre.co.uk/
    For better, quicker answers on T-SQL questions, click on the following...http://www.sqlservercentral.com/articles/Best+Practices/61537/
    For better, quicker answers on SQL Server performance related questions, click on the following...http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply