> numericcolumn datatype is float
>
> ypul
Probably using the wrong data type. Why have you chosen to use an
approximate data type like float/real instead of DECIMAL/NUMERIC which
stores an exact represenation of a number? Do you really need to store.
From BOL:
"Approximate number data types for use with floating point numeric data.
Floating point data is approximate; not all values in the data type
range can be precisely represented."
If you either must use a float or cannot change the data type to
something more appropriate, you have two options:
1- Format the numeric data on the client - client formatting is
preferred over using SQL Server to do the same
2- Use the CAST function, but you may have to deal with rounding issues
For example:
Declare @f real
Set @f = .05
Select @f -- Returns 5.5500001E-2
Select CAST(@f as NUMERIC(10, 2)) -- Returns .06

Signature
David Gugick
Quest Software
www.imceda.com
www.quest.com
ypul - 10 Aug 2005 09:28 GMT
Thanks Buddy
that was very very ......helpful !!
ypul
> > numericcolumn datatype is float
> >
[quoted text clipped - 21 lines]
> Select @f -- Returns 5.5500001E-2
> Select CAST(@f as NUMERIC(10, 2)) -- Returns .06