SQL Question

  • Thread starter Thread starter Welthey
  • Start date Start date
W

Welthey

I currently have a table in SQL. One of my fields is a MONEY data type
field. Is there anyway to drop off anything after the decimal point and make
the values in there whole numbers?
 
You could try the Round Function:

Dim MyVar, pi
pi = 3.14159
MyVar = Round(pi, 2) ' MyVar contains 3.14.


Use 0 to make the number 3
 
It depends on what exactly you are trying to do. Assuming you mean it is a
Currency field, you can change the Decimal Places (in table design view) to
0. This will round the number. If you want to allow users to enter exact
decimal values, but display only the whole dollar, you can use code or
formatting on the form or report. If you want the integer portion of the
number regardless of the decimal value, try the Int function.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top