MAX

  • Comments posted to this topic are about the item MAX

  • From a logical point of view the message

    "Warning: Null value is eliminated by an aggregate or other SET operation"

    is quite good as NULL might mean unknown, not applicable or optional for input. Thus, we can not savely say if the displayed MAX is the correct MAX, if all rows containing NULL were properly filled.

    There were long discussions about this in comp.databases.theory

    brgds

    Philipp Post

    brgds

    Philipp Post

  • Out Put is : 0

    Warning message wasn't showing in any of the versions (2000 and 2005)

  • Ram Mohan Reddy (5/5/2009)


    Out Put is : 0

    Warning message wasn't showing in any of the versions (2000 and 2005)

    Did you try looking in the Messages tab or setting the results to output to text?

    I saw the messages in those places, even though when I ran it in grid view (SQL 2000) I didn't see it.

    If you still don't see the message, then I'm stumped, and maybe someone else can weigh in.

    - webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

  • Agreed, I didn't saw the message

  • I got "0" and the warning in 2005 SP2. The "0" was on the Results tab and the warning was on the Messages tab.

  • Hit CTRL + T that then run it again. That will put you in text mode so the result and messages are on one screen. CTRL + D will put them back in the Datagrid format.

  • Good

  • ghollis (5/5/2009)


    Hit CTRL + T that then run it again. That will put you in text mode so the result and messages are on one screen. CTRL + D will put them back in the Datagrid format.

    Thanks for the tip! Much nicer than having two tabs!!

  • Thanks Gollis, that shortcut may prove useful in future!

  • I expected that I'd get the 0 result, but wasn't sure about the message. Anyway, I got

    "

    (1 row(s) affected)

    (1 row(s) affected)

    (1 row(s) affected)

    Warning: Null value is eliminated by an aggregate or other SET operation.

    (1 row(s) affected)

    "

    showing in my Message tab

  • Here are what I got in sql 2005 SP3 showing as Text:

    (1 row(s) affected)

    (1 row(s) affected)

    (1 row(s) affected)

    -----------

    0

    Warning: Null value is eliminated by an aggregate or other SET operation.

    (1 row(s) affected)

  • surely it depends on your system settings... I rather think I would get a failure: can't insert null into non nullable column... 😛

  • also depends if you have SET ANSI_WARNINGS ON or not

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • This one was easier than to chew water!

    ________________
    DBA Cabuloso
    Lucas Benevides

Viewing 15 posts - 1 through 15 (of 16 total)

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