• This might be what you are looking for:

    Check out Brandie Tarvin blog posting at:

    https://www.google.com/reader/view/?hl=en&tab=my#stream/feed%2Fhttp%3A%2F%2Fbrandietarvin.livejournal.com%2Fdata%2Frss

    Let’s start with precedence. 2 + 3 = 5. And 2 + 3 – 4 will always equal 1. Precedence in math and SQL is identified by the use of parenthesis. Everything is operated on from the inside heading to the outside. So we have two possible formulas: (2 + 3) – 4 or 2 + (3 – 4).

    Here’s the difference

    We start with (2 + 3) – 4 and work the parens first. The formula becomes (5) – 4. Then 5 – 4 = 1.

    We start with 2 + (3 – 4) and work the parens first. The formula becomes 2 + (-1) where the addition gets changed to a minus due to the presence of a negative number. So now we have 2 – 1 (which is the same as 2 + -1) = 1.

    Precedence becomes really important in cases of the division and multiplication operands: * or /. So when we have a formula like 2 + 3 * 4, our two possibilities are either (2 + 3) * 4 or 2 + (3 * 4). Now we have 2 possible answers, that of 20 or that of 14.

    (2 + 3) * 4 becomes (5) * 4 becomes 20.

    2 + (3 * 4) becomes 2 + (12) becomes 14.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]