Insert a numeric value with decimal

  • Is there anyone that has a solution to my problem.

    INSERT test VALUES ('ABC', 50,9)

    The table has a field declared as numeric, insert works if there is no decimal sign.

    50 is ok but not 50,9.

    Help please

     

     

  • I imagine that it's being interpreted as three values: ABC, 50, and 9.  What error message are you getting?

    John

  • Since you did not post the table definition, nor the actual error message it is very difficult to help.  The following test code works fine under my SQL 2000 SP4:

    create

    table t1 (col1 char(3), col2 numeric, col3 numeric)

    insert

    into t1 values ('abc',50,9)

    insert

    into t1 values ('abc',50,9.)

    IF your are trying to insert the value 50.9 then use a "period" for the seperator not a comma.  Otherwise Please provide additional information to help us help you.

  • Thanks, using a period was the solution.

    Now I can insert 50.9.

     

    / Rolf

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

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