Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    73

    Unanswered: Access SQL Rounding

    Hey,
    I have a simple and hopefully quick question.
    How do Access to ROUND a number up for any decimal.
    IE:
    8.1 = 9
    8.2 = 9
    8.5 = 9
    8.9 = 9

    If I do a Round, it only rounds if its .5. Is there any way to specifiy to round up at ANY decimal?

    Thx.

  2. #2
    Join Date
    Oct 2003
    Posts
    73
    Well, I did some more searching and came up with a solution (refer to: http://groups.google.ca/groups?hl=en...3DN%26tab%3Dwg)

    I didn't know that you could reference your own custom functions in sql queries.

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    I think that could have been done a little cleaner...

    Something like
    Code:
    If Round(i, 0) < i Then
       result = Round(i, 0) + 1
    else
       result = Round(i, 0)
    End If
    Personal preference only of course...
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  4. #4
    Join Date
    Oct 2003
    Posts
    73
    that is cleaner. thx for the reply.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •