Do you have a comment or suggestion to improve SQL Server? We’d love to hear it!

DIVIDE function in T-SQL

The languages MDX and DAX both have a DIVIDE function, which has the following syntax:

DIVIDE(<numerator>, <denominator> [,<alternateresult>])
The alternate result is specified as the result when a division by zero is encountered. If it isn't specified, NULL is returned.

This would be a fine addition to the T-SQL language.

7 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Koen Verbeeck shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base