Integer division

  • Does the integer division return a floor or a ceiling of the result? I checked the BOL to see if this question was there but all it has is

    "\ Divides two numbers and returns an integer result." Thanks

  • Floor. Exactly like grade-school division.

    8 divided by 3 is 2, with a remainder of 2. It gives you 2 as the answer, because "remainder 2" isn't expressable in integers.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • To use your terminology, the floor, 3/2 = 1.

  • Thank ya both...I guess my google search would have been victorious had I taken out the SSRS of "integer division ssrs" 😛

  • teej21012 (4/17/2012)


    Thank ya both...I guess my google search would have been victorious had I taken out the SSRS of "integer division ssrs" 😛

    If you think that's fun, trying Googling "&" to find out what it means in code. Or Google "or". Fun stuff!

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply