T-SQL Syntax

  • Ouch, this one made my brain hurt.

    Impossible to answer, but it did make me think.

  • I agree with Hugo. I thought of a couple of ways this could be done in my head before answering first, but didn't bother trying to research any other ways.. took an educated stab at an answer, but guessed wrongly. Knowing the answer now doesn't really serve me much use either going forward. Fair play to the author though for coming up with this and their research; it's just one that I won't remember for too long 🙂

  • It was a thinking question. I never even counted how many ways a variable could be set to a value. Having to leave out the basic SET (I don't count SET in the UPDATE statement the same way as it is required) and SELECT statements, how many ways are there? Yes, you could count some multiple times, but if you think about it, it's still the same (a duplicate, if you will).

  • Koen Verbeeck (8/17/2012)


    Great question, but way too difficult for a Friday 🙂

    +1

    Kept on coming back to it through the day - still got it wrong!

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

  • Good question, didn't have the time to investigate in BOL, so I took a guess and got it right.

    Happy weekend everyone!!

    "El" Jerry.

    "A watt of Ottawa" - Gerardo Galvan

    To better understand your help request, please follow these best practices.[/url]

  • I had no idea what the correct answer was and still don't.

  • Cliff Jones (8/17/2012)


    I had no idea what the correct answer was and still don't.

    There is no correct answer. Several terms in the question were vague enough to ensure that. It's a great concept to think about and discuss, but I don't think a QotD served well as the mechanism to introduce it.

  • Hugo - I appreciate your comments, and probably agree with most of them. 🙂

    If this generated some thinking, some head scratching, some friendly debate, and even a little education, I think the QoD goal has been met, even if not delivered quite perfectly.

    And maybe it helps us remember that this is a pretty complex product we program & support. And that we are not deficient at our job if we do not have every detail memorized.

    But Yes, I am the person that occasionally will "read BOL entirely" just for curiosity, and to maybe discover something new and interesting and maybe even useful! [And yes, I also am the rare person who reads farther than the first page of Google results.]

  • Hugo Kornelis (8/17/2012)


    I appreciate the amount of research that went into this question and I think it has a good educational value, but I don't think a QotD is the right form for this education - at least not a QotD in this specific form.

    Got to this late today. So thanks to Hugo for saving me having to respond with that thought. However, my response would not have been so detailed or well written. I appreciate the effort of OP, but looked at the question after a long day and thought, "Who cares?" But that says more about me and my day than the question. 🙂

    [font="Verdana"]Please don't go. The drones need you. They look up to you.[/font]
    Connect to me on LinkedIn

  • Cliff Jones (8/17/2012)


    I had no idea what the correct answer was and still don't.

    +1

    ...One of the symptoms of an approaching nervous breakdown is the belief that ones work is terribly important.... Bertrand Russell

  • I got it right - but my list of possibilities was different from the questioner's 🙂

  • Interesting question, and my answer were pure guesswork. I would argue with the first kind, as arguments to function calls or procedures. Although they can be varied, I don't regard an input argument to be a variable. Output variables are a special kind, but ARE assignments to variables outside the SP.

    But I will side with Hugo in regarding this as a question with no clearly defined answer.

    Thanks for a QoT that sparked a good discussion.

  • Wow, that was a tough one. I think I could have researched all day and still missed this one. At least it started some good discussion.

  • GPO (8/18/2012)


    Cliff Jones (8/17/2012)


    I had no idea what the correct answer was and still don't.

    +1

    +1, with a lucky guess

  • lucky guess. I could only think of 3...

Viewing 15 posts - 16 through 30 (of 31 total)

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