Are the posted questions getting worse?

  • GilaMonster (6/5/2009)


    Lynn Pettis (6/5/2009)


    GilaMonster (6/5/2009)


    Lynn Pettis (6/5/2009)


    Here is another OMG moment.

    He may have just misunderstood what BoL was. I'd be a little unhappy if I asked a simple question and was told to go buy a book. Let's see how he responds.

    Partial points for this answer. I'll bite that maybe he didn't understand what Books Online is, but I NEVER used the word BUY or phrase BUY THE BOOK. 😉

    No, but if he assumed you were telling him to go read a book that he thought he didn't have....

    That's why I am giving you partial points on this one. What I am thinking of doing in the future when I suggest to OP's to read Books Online is to add an additional statement that this is the SQL Server Help file that comes with SQL Server. This way, they shouldn't become confused. :w00t:

  • Lynn Pettis (6/5/2009)


    What I am thinking of doing in the future when I suggest to OP's to read Books Online is to add an additional statement that this is the SQL Server Help file that comes with SQL Server. This way, they shouldn't become confused. :w00t:

    For guys that sound really new that's a good idea, that or give them a link to the online version of BoL. Probably wouldn't do it for everyone.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (6/5/2009)


    Lynn Pettis (6/5/2009)


    What I am thinking of doing in the future when I suggest to OP's to read Books Online is to add an additional statement that this is the SQL Server Help file that comes with SQL Server. This way, they shouldn't become confused. :w00t:

    For guys that sound really new that's a good idea, that or give them a link to the online version of BoL. Probably wouldn't do it for everyone.

    That sounds like a better plan. Of course, it also means putting the url for the online version somewhere handy so I get it easily. I just use my local copy of BOL when I need it.

    😉

  • That's why I always spell it out the first time that I am responding to someone I haven't seen before, like "...BOL(Books Online)...", though now I am thinking that that may not be enough either.

    (Believe it or not, the first time I cam to this site, it took me a day to figure out what this "BOL" was that everyone kept talking about. And SSMS? What was that and when did it come out? 🙂 ).

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • The first time I mentioned BOL I did spell it out, but I didn't put the TLA along with it. You'll see that if you look at my post just above where I use the TLA BOL.

    😛

  • Lynn Pettis (6/5/2009)


    GilaMonster (6/5/2009)


    Lynn Pettis (6/5/2009)


    What I am thinking of doing in the future when I suggest to OP's to read Books Online is to add an additional statement that this is the SQL Server Help file that comes with SQL Server. This way, they shouldn't become confused. :w00t:

    For guys that sound really new that's a good idea, that or give them a link to the online version of BoL. Probably wouldn't do it for everyone.

    That sounds like a better plan. Of course, it also means putting the url for the online version somewhere handy so I get it easily. I just use my local copy of BOL when I need it.

    😉

    Hopefully they installed it when they installed the server. You could always tell them to press the {f1} function key to get to it.

    --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)
    Intro to Tally Tables and Functions

  • Lynn Pettis (6/5/2009)


    Here is another OMG moment.

    Lynn, I see yet once again why we refer to you as Saint.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • You know, it's always those complex T-SQL concepts that trip up so many people.

    Good going Gail!

    Edit: fixed link

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • WayneS (6/6/2009)


    You know, it's always those complex T-SQL concepts that trip up so many people.

    Good going Gail!

    Hi Wayne,

    your link doesn't work (double referenced).



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Lynn Pettis (6/5/2009)


    GilaMonster (6/5/2009)


    Lynn Pettis (6/5/2009)


    What I am thinking of doing in the future when I suggest to OP's to read Books Online is to add an additional statement that this is the SQL Server Help file that comes with SQL Server. This way, they shouldn't become confused. :w00t:

    For guys that sound really new that's a good idea, that or give them a link to the online version of BoL. Probably wouldn't do it for everyone.

    That sounds like a better plan. Of course, it also means putting the url for the online version somewhere handy so I get it easily.

    I've got a firefox extension called "Clippings". I have a fair few 'standard' replies and urls in there. Other alternative, stick it as a bookmark. In firefox if I drag a bookmark to a text box, the url of that bookmark is pasted in. Don't know about IE.Please post in the appropriate forum in the future.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • WayneS (6/6/2009)


    You know, it's always those complex T-SQL concepts that trip up so many people.

    Good going Gail!

    I know. Those darned updates are just so hard to understand. :hehe:

    Correct link - http://qa.sqlservercentral.com/Forums/FindPost730218.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Regarding the update of the table variable.

    Let me start by saying that the poster's comments grated with me too...especially considering the first post was incomplete and contained errors.

    Having said all that, I do have some sympathy. And not just because of the (presumed) language barrier.

    The requirement to alias a table variable for UPDATE is not spectacularly well documented in BOL. A quick skim over the entry for the UPDATE statement revealed nothing to me - I may have missed it, but I don't think so. It is logical once you think about it, but I don't think it is obvious.

    I think it is quite natural that someone would expect to write UPDATE @t SET ... or even UPDATE @t AS T SET ...

    UPDATE T SET ... FROM @t AS T is quite odd-looking, at least to me. (Ok so a join was required in this case anyway so the FROM was needed in any case)

    I think I am right in saying that Gail's post originally had UPDATE t SET ... FROM @t t... so it was perhaps forgivable to miss the alias. This is one reason I personally prefer to always include the optional 'AS'. To me, ...FROM @t AS t... is clearer somehow.

    Oh and hey, no criticisms intended, just adding my take on the wider point.

    Paul

  • I see mjarsaniya has posted a very apologetic reply.

    Good on him/her. It would have been easy to take the solution and run.

    Nice to see.

    http://qa.sqlservercentral.com/Forums/FindPost730229.aspx

  • Paul White (6/6/2009)


    Having said all that, I do have some sympathy. And not just because of the (presumed) language barrier.

    The requirement to alias a table variable for UPDATE is not spectacularly well documented in BOL. A quick skim over the entry for the UPDATE statement revealed nothing to me - I may have missed it, but I don't think so. It is logical once you think about it, but I don't think it is obvious.

    Yes it does look weird, and I'd have understood fully if he said he didn't understand or wasn't sure why it worked. Having people tell me that my code doesn't work when it's clear that they haven't even tried it irritates me. Especially since I had tested it cause I'm never quite sure of the update syntax myself (keep forgetting if it's UPDATE TableName or UPDATE TableAlias). That's what grated for me, not the lack of understanding.

    You didn't find the syntax under UPDATE, because it's somewhere else and it's impact on the UPDATE statement has to be inferred. Specifically on the page detailing the table data type. (Yup, first place I'd have looked for it, not)

    ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_6tsql/html/1ef0b60e-a64c-4e97-847b-67930e3973ef.htm

    Outside a FROM clause, table variables must be referenced by using an alias, as shown in the following example:

    SELECT EmployeeID, DepartmentID

    FROM @MyTableVar m

    JOIN Employee on (m.EmployeeID =Employee.EmployeeID AND

    m.DepartmentID = Employee.DepartmentID)

    The only thing the Update page states is

    A table variable, within its scope, can be used as a table source in an UPDATE statement.

    Table source defined as a table appearing after the FROM in the update statement. Though from that alone, I could easily assume it's not possible to update a table variable at all.

    Doesn't help that none of the examples use an alias and it doesn't say anywhere that aliases can be used in the UPDATE. Though I do have an older copy of BoL. Think I might submit request for enhancements on that page.

    I think I am right in saying that Gail's post originally had UPDATE t SET ... FROM @t t... so it was perhaps forgivable to miss the alias. This is one reason I personally prefer to always include the optional 'AS'. To me, ...FROM @t AS t... is clearer somehow.

    It did. My habit is to use AS on column aliases but to omit it on table aliases. It's just how I code.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • lmu92 (6/6/2009)


    WayneS (6/6/2009)


    You know, it's always those complex T-SQL concepts that trip up so many people.

    Good going Gail!

    Hi Wayne,

    your link doesn't work (double referenced).

    Thanks, I fixed it.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

Viewing 15 posts - 5,416 through 5,430 (of 66,000 total)

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