A Strange Comparison

  • Comments posted to this topic are about the item A Strange Comparison

  • Heh... you're such a "NOTty" boy! 😀  I haven't seen syntax like that in a very long time.  Lot's of bloody != but incredibly little !< and !>.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • What is the difference between the second and the third answer?

  • Wolfram Kraus wrote:

    What is the difference between the second and the third answer?

    Well, nothing reading the text for both answers. The fact that both answers were used is probably interesting in itself.

  • Bob Razumich wrote:

    Wolfram Kraus wrote:

    What is the difference between the second and the third answer?

    Well, nothing reading the text for both answers. The fact that both answers were used is probably interesting in itself.

    Heh... the only difference appears to be the different number of people that thought it was a correct answer. 😀

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Typo and an answer got repeated.

  • Interesting.. Didn't even know that this was in T-SQL. I got the answer right because I have programmed in C. Is this just a T-SQL thing or is it standard SQL ( whatever that is ) ?

  • I guess you have  to read that in English:  ! is Not,  <  is Less, so !<  is Not Less than

    Great Question!

    Regards,Yelena Varsha

  • Thanks for the question, Steve!

    The next question would be, what is the best way to write this for readability? Should we be using "NOT" or flip the operator to use ">". Looking through legacy code, I see "!" more often.

    WHERE sd.Profit NOT < 10000;
    WHERE sd.Profit > 10000;
  • If you flip the operator then it needs to be >=

Viewing 10 posts - 1 through 9 (of 9 total)

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