how to suppress zeroes after decimal point at the end in a value

From: hari (anonymous_at_discussions.microsoft.com)
Date: 09/23/04


Date: Wed, 22 Sep 2004 23:31:03 -0700

hi,
   i have a sql table field price and datatype is
decimal 13(20,6).
  when i insert values to this field, values are being
inserted correctly. i.e. 13.45 inserted as 13.45 and
145.653 inserted as 145.653 only.
But while fetching only the values are coming as 13.450000,
145.653000, because the datatype is decimal 13(20,6) with
6 decimals. but i want 13.45, 145.653 as in the table.
 How suppress the unwanted zeroes at the end of those
numbers.
any help.

thanks,
hari.



Relevant Pages

  • Re: Help with code problem on form
    ... binary fraction - and binary fractions are exactly how Floats and ... Any number is accurate to some fourteen decimals ... The simplest getaround is to change the datatype of your fields from ... Numberto Currency. ...
    (microsoft.public.access.forms)
  • Re: FTS Weighted Values Implementation Problem
    ... a number into a textbox which assigns the weight value for each ... I don't want the user to have to work with decimals directly, ... I adjusted my SELECT statement using the syntax you provided for the ... So I created a version with double datatype instead of ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Why does SQL Server round numbers of double type?
    ... Did you define a scale for your numeric datatype? ... > I already use numeric data type, but it still stores the value as integer. ... >> An INTEGER is just that - no decimals will be stored. ... See SQL Server Books Online for details of the available ...
    (microsoft.public.sqlserver.programming)
  • Re: taking off decimals
    ... Since it shows up in Query Analyzer as ... is the datatype of each of the FieldN values ... Pro SQL Server 2000 Database Design - ... > the number with decimals eg. 9000.00000 and I donīt want decimals to be ...
    (microsoft.public.sqlserver.programming)
  • Re: form rounding off decimals
    ... the decimals formatted to one. ... it's the datatype of the number fields in the Table. ... The format and the decimals properties don't change the ...
    (microsoft.public.access.forms)