QOD 10-27

  • Perhaps we could use a something closer to correct English syntax

    "Returns the name of the computer where the query was executed."

    "Returns the computer name of the who is running the query." is a bit misleading.

  • Never used this but tried host_name()

    both with the braces and without and all erred out in both versions 7& 8 of sql server

    Am I missing something?

    Thanks

    Mike

  • SELECT HOST_NAME()

    results in

    
    
    --------------------
    WS110H1009008

    (1 row(s) affected)

    Frank

    http://www.insidesql.de

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Thanks

    Mike

  • This question is "broken." I answered "Returns your SQL Server's computer name" in the email, clicked on the answer question button and then clicked answer on the web page. When the answer page came up it said my answer of "Returns the computer name of the who running the query" was wrong. What a rip! Considering this answer has garnered 68% of the responses it would seem I am not alone here, can anybody else back me up here?

    I probably should not complain, it was only a one point question and if there is an error we should cut the person who sets these up some slack since I know that I have made some coding errors myself over time.

  • "Returns the computer name of the who is running the query." is correct, even if the English syntax is bad. "Returns your SQL Server's computer name" is wrong - unless you run the query local on the sql server computer.

    Data: Easy to spill, hard to clean up!

  • Yes - the computer name of the who .. is the correct response. The issue is exactly as noted, it depends where the query is executed. That unit's name will be the return value. A 'who' has implications of something / someone not local to the executing box.

Viewing 7 posts - 1 through 6 (of 6 total)

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