Results 1 to 4 of 4

Thread: *RESOLVED* Rounding to 2 Decimals Within Access 97??

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Location
    New York
    Posts
    679

    *RESOLVED* Rounding to 2 Decimals Within Access 97??

    I am creating Java Server Pages that connect ( at present) to an Access 97 database...

    I need to know if anyone out there knows the proper function for rounding a double integer to 2 decimal places, thus removing the floating numbers...

    I am having a heck of a time figuring this out, and that is why I have come to you!!

    I need to change the following sql Select statement to round specific fields:

    Code:
    "select ID, RepName, PhoneTotal, EmailTotal, MailTotal, AUX, ACW, TalkTime from qryCPMS  " _
    & "where [tblHBUS.Unit Manager] = '" & unitMgr & "' and [tblProductivity.Unit Manager] = '" & unitMgr & "'  " _
    & "and tblHBUS.Month = '" & month & "' and tblProductivity.Month = '" & month & "' and tblHBUS.Year = '"& year &"' " _
    & "and tblProductivity.Year = '" & year & "' ORDER BY ID ")
    Any assistance will be extremely welcomed!
    Last edited by Salvatore; Aug 25th, 2004 at 07:00 AM.

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Location
    New York
    Posts
    679
    I forgot to add that the fields that need to be rounded are the following:

    1. PhoneTotal
    2. EmailTotal
    3. MailTotal

    Thank You!

  3. #3
    Hyperactive Member dRAMmer's Avatar
    Join Date
    Oct 2001
    Location
    strangelans
    Posts
    463
    use ROUND in your select statement:

    ROUND(123.4561, 3) = 123.4560
    ROUND(123.9991, 3) = 124.0000
    live, code and die...

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2001
    Location
    New York
    Posts
    679
    Thank you very much...I tried to use the Round function within my SQL view on Access and it would not work...but when i tried it right within my JSP, it worked GREAT!!

    And that is what counts...thanks again!

Posting Permissions

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



Click Here to Expand Forum to Full Width