Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Problem with numeric data type

sunilyenpuresunilyenpure Member Posts: 3
Hi Friends,

In my database there is one field height having data type numeric
but when ever i store say 4.1 then it stores 4.10 instead on 4.1
so it create problem while displaying data. I have found one solution
to remove last 0 from resulted data but if user enters 4.10 as height
every time it will 4.1 and not 4.10

So plz anybody help me what are other possible solutions or any mistake
made by me regarding the datatype selection.




Comments

  • Funky DungeonFunky Dungeon Member Posts: 1
    : Hi Friends,
    :
    : In my database there is one field height having data type numeric
    : but when ever i store say 4.1 then it stores 4.10 instead on 4.1
    : so it create problem while displaying data. I have found one solution
    : to remove last 0 from resulted data but if user enters 4.10 as height
    : every time it will 4.1 and not 4.10
    :
    : So plz anybody help me what are other possible solutions or any mistake
    : made by me regarding the datatype selection.
    :
    :
    :
    :

    Why not just use type VARCHAR....
  • sunilyenpuresunilyenpure Member Posts: 3
    Hi,
    Thanks for your reply,

    I could not store height in Varchar because i have to fire some queries on that table which store Height
    example show me profile having height between 4.5 to 5.5
    I have not tried with query having datatype varchar datatype and then having some query like this that i mentioned above.

    : : Hi Friends,
    : :
    : : In my database there is one field height having data type numeric
    : : but when ever i store say 4.1 then it stores 4.10 instead on 4.1
    : : so it create problem while displaying data. I have found one solution
    : : to remove last 0 from resulted data but if user enters 4.10 as height
    : : every time it will 4.1 and not 4.10
    : :
    : : So plz anybody help me what are other possible solutions or any mistake
    : : made by me regarding the datatype selection.
    : :
    : :
    : :
    : :
    :
    : Why not just use type VARCHAR....
    :

Sign In or Register to comment.