ARGH!! ROUNDING!! Can't get rid of trailing zeros

  • Thread starter Thread starter Rico
  • Start date Start date
R

Rico

Hello,

I'm not sure if this is an SQL issue or an Access issue. I have an Access
2002 FE and I'm using a passthrough query to retrieve some information from
SQL server 2000. I am rounding in the SQL View to two decimal places, but
the passthrough is giving me numbers like 14.450000. I've tried everything
to get rid of the zeroes and convert to two decimal places, but I don't want
to write extraneous code just to conquer this problem.

Any ideas?

Thanks.
 
The values 14.450000 is the same as 14.45. Various tools present a human readable form of the binary
values that SQL Server returns based on the datatypes. this seems to be some DECIMAL(x,6) datatype,
so the tool assumes you want to see all decimals. Rounding won't change this, but converting into
some other datatype will.
 
Rico said:
Hello,

I'm not sure if this is an SQL issue or an Access issue. I have an Access
2002 FE and I'm using a passthrough query to retrieve some information
from SQL server 2000. I am rounding in the SQL View to two decimal
places, but the passthrough is giving me numbers like 14.450000. I've
tried everything to get rid of the zeroes and convert to two decimal
places, but I don't want to write extraneous code just to conquer this
problem.

Specifying a Format for the Control in which the information is displayed
will let you limit the number of fractional digits. That would not, in my
view, qualify as "writing extraneous code just to conquer this problem"; it
would be "using the software tools as intended". Default views of various
kinds aren't always what you would like them to be.

Larry Linson
Microsoft Access MVP
 
Back
Top