How many rows are returned from the query below?

  • Chad Crawford (3/4/2010)


    BTW - I thought of a few more assumptions that should have been included:

    --Assume you are in the database containing tblUsers

    --Assume you have been granted rights to select from tblUsers

    --Assume the server has available memory

    --Assume there is "sufficient" (whatever that means) disk space on the drive containing tempdb

    --Assume the server room has available power (line or generator)

    --Assume the server is plugged in

    --Assume the server is on

    --Assume the hippo is asleep

    Ok, maybe not the last one, but it's good to check anyway before storming the tent. πŸ˜€

    I quit writing QODs because I couldn't come up with all the assumptions. I'm glad that others persist.

    Chad

    Nice. SOM

    The hippo is asleep btw.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • JF1081 (3/3/2010)


    Assumption 3: I have more than one user in a "users" table. If I only had one user I would be better off writing the user's info on a sticky note and not spending the effort on SQL.

    This assumption I disagree with...

    What if the customer knows they want a single "catch-all" user for the moment - but in 3 years' time they will want to expand to have more?

    Surely this is a time where you would validly have a users table with only one user (probably also on a development system).

    Again, the Users table might be a table containing all *privileged* users, since the applicatin requires than any Joe Bloggs can use the database, but only the manager may perform privileged operations.

    It wouldn't take a lot of extra effort to simply state "Assuming we have a table called tblUsers with 10 entries..."

    Kelsey Thornton
    MBCS CITP

  • CirquedeSQLeil (3/4/2010)


    How many people only answer the question, unless they get it wrong?

    I quite frequently read the discussion if I got the answer right - it's all part of the learning experience.

    Kelsey Thornton
    MBCS CITP

  • CirquedeSQLeil (3/4/2010)


    The hippo is asleep btw.

    I think it's sleeping on top of the duck πŸ™

  • I think that I am probably one of those who has been criticised in this thread because I have complained about a number of the questions written for SQLServerCentral.

    I am sorry if some respondents consider that I have been fickle, or overly fussy, but I really do believe that if one is to set questions on a platform such as SQLServerCentral, then one must be careful to ensure that the questions are properly phrased, in correct English, and that any assumptions are stated. And by "assumptions" I am not meaning those that one or two correspondents have taken ad absurdum - I mean for example, that if a table name is specified in the question, then it should exist in one of the standard or demo databases that are available for SQLServer, and that database should be referred to in the question. It is also only right and fair that if some specific user privileges or permissions are required then they too should be specified.

    Where are the guidelines for questions? Where are the responses from the moderators?

    If one wishes to place questions on this platform, one is assuming a position of authority; in some ways one might be regarded as a professional examiner in this subject. In order to claim that authoritative position, then one must aspire to certain professional standards in the the questions posed. Otherwise stick to providing answers, not questions!

    Kenneth Spencer

    You never know: reading my book: "All about your computer" might just tell you something you never knew!
    lulu.com/kaspencer

  • Chad Crawford (3/4/2010)


    BTW - I thought of a few more assumptions that should have been included:

    --Assume you are in the database containing tblUsers

    --Assume you have been granted rights to select from tblUsers

    --Assume the server has available memory

    --Assume there is "sufficient" (whatever that means) disk space on the drive containing tempdb

    --Assume the server room has available power (line or generator)

    --Assume the server is plugged in

    --Assume the server is on

    --Assume the hippo is asleep

    Thanks for trivializing a legitimate gripe despite what you believe.

    The fact of the matter is any of the answers presented would have been correct given a certain set of assumptions. There were really no wrong answers.

    Please go ahead and continue mocking me and others that feel the same as I do by posting an asinine list of assumptions. It is not like other QOTD's never included Create Table or Insert statements.

  • Fatal Exception Error (3/5/2010)


    Chad Crawford (3/4/2010)


    BTW - I thought of a few more assumptions that should have been included:

    --Assume you are in the database containing tblUsers

    --Assume you have been granted rights to select from tblUsers

    --Assume the server has available memory

    --Assume there is "sufficient" (whatever that means) disk space on the drive containing tempdb

    --Assume the server room has available power (line or generator)

    --Assume the server is plugged in

    --Assume the server is on

    --Assume the hippo is asleep

    Thanks for trivializing a legitimate gripe despite what you believe.

    The fact of the matter is any of the answers presented would have been correct given a certain set of assumptions. There were really no wrong answers.

    Please go ahead and continue mocking me and others that feel the same as I do by posting an asinine list of assumptions. It is not like other QOTD's never included Create Table or Insert statements.

    Chad wasn't trivializing your gripe, just exaggerating the request for eliminating assumptions. Just how far do you take it?

  • kaspencer (3/5/2010)


    I think that I am probably one of those who has been criticised in this thread because I have complained about a number of the questions written for SQLServerCentral.

    I am sorry if some respondents consider that I have been fickle, or overly fussy, but I really do believe that if one is to set questions on a platform such as SQLServerCentral, then one must be careful to ensure that the questions are properly phrased, in correct English, and that any assumptions are stated. And by "assumptions" I am not meaning those that one or two correspondents have taken ad absurdum - I mean for example, that if a table name is specified in the question, then it should exist in one of the standard or demo databases that are available for SQLServer, and that database should be referred to in the question. It is also only right and fair that if some specific user privileges or permissions are required then they too should be specified.

    Where are the guidelines for questions? Where are the responses from the moderators?

    If one wishes to place questions on this platform, one is assuming a position of authority; in some ways one might be regarded as a professional examiner in this subject. In order to claim that authoritative position, then one must aspire to certain professional standards in the the questions posed. Otherwise stick to providing answers, not questions!

    Kenneth Spencer

    First, most people that have submitted QotD are not authoritive individuals nor professional examiners in the subject. Some are people learning just like you that have found something interesting and took the time to write up a QotD for others to answer and learn from as well. The only exception I would have to thins would be individuals like Paul Randal that who sometimes submit QotD to SSC.

    As for requiring that any tables/databases be standard or demo databases, I fully disagree. For instance, we don't have any of the demo databases installed on our development or production servers here at work. If we could get the sandbox server we have requested for several years, then I'd have those databases available at work as we would use those for experimenting.

    I'd like to see you submit a QotD (and yes I am working on one myself, just haven't had much time to work on it due to work at the moment), and see how you do. As I said earlier, this question required some thought and some basic assumptions to arrive at the correct answer, and it didn't require trying to run the code to find out what the answer was before selecting it either.

    The QotD is not an examination question, it is meant to make people think and test their knowledge, and with that, the discussions are very important. Too bad that for some they choose to gripe and complain.

  • kaspencer (3/5/2010)

    then one must be careful to ensure that the questions are properly phrased, in correct English

    May I point out that the SSC community includes members from countries world wide, whose native language is NOT english. Do you wish to discriminate against them, to raise a barrier to their insight and contributions?

    I mean for example, that if a table name is specified in the question, then it should exist in one of the standard or demo databases that are available for SQLServer

    This immediately raises in my mind the thought that you do NOT desire to test your knowledge, but rather test your ability to cut and paste.

    Where are the guidelines for questions?

    Here:

    http://www.sqlservercentral.com/articles/SQLServerCentral/62764/

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • Fatal Exception Error (3/5/2010)


    Chad Crawford (3/4/2010)


    BTW - I thought of a few more assumptions that should have been included:

    --Assume you are in the database containing tblUsers

    --Assume you have been granted rights to select from tblUsers

    --Assume the server has available memory

    --Assume there is "sufficient" (whatever that means) disk space on the drive containing tempdb

    --Assume the server room has available power (line or generator)

    --Assume the server is plugged in

    --Assume the server is on

    --Assume the hippo is asleep

    Thanks for trivializing a legitimate gripe despite what you believe.

    The fact of the matter is any of the answers presented would have been correct given a certain set of assumptions. There were really no wrong answers.

    Please go ahead and continue mocking me and others that feel the same as I do by posting an asinine list of assumptions. It is not like other QOTD's never included Create Table or Insert statements.

    I deeply apologize. Although it was partially an attempt at humor, it was not my intent to mock you or anyone who is frustrated with the QOD.

    My intent was to point out that there is a long list of potential assumptions for any QOD and any QOD submitter, being human, is likely to forget one or more that are applicable to their question. Yes, other QODs have included create table and insert statements, but in the 5 or so years I've been answering the QOD, I remember very few that went to that level. Maybe they should have. We (speaking of everyone frequenting SSC, not any select group) are all professionals, but there are probably very few who are professional question writers. I dare say that most of the QODs were written by someone who in the course of their normal work (whether it be DBAdmin, DBArchitecth, DBDeveloper, DB%, or even "not like '%DB%' ") found something odd or new and thought, "Hey, I'll bet no one knows this, it would make a great question". Because this is a community effort, very few QODs are written by people well versed in the art of testing and question writing. It's a community effort and that shows from time to time.

    Yes, the items at the end of my list were ridiculous in nature. But the ones at the top were not. If the question were to really show the reasonable assumptions to answer the question, indicating that the user has permissions should definitely be one of them, but only one post in this discussion brought that out. Why? Because I'll wager that almost everyone assumed that was an unspoken assumption. That’s what I hoped to bring out with my list - there is a long list of assumptions that we work with all the time. Given that each of the answers had legitimate claim to be right forces one to step back and think, "What was the original intent of this question - what are they trying to test?" You may feel that there is a little luck involved there, but even recognizing that each of the answers is potentially correct shows that you have a level of knowledge greater than most, and you can take pride in that. If it's the points you need - there are about a half dozen different ways to guarantee you get the QOD right every time, and I'd be happy to share if you want some (I use two regularly - I allow myself to Google/BOL before answering and sometimes I'll read the discussion before answering if there is something I'm not clear on, but I'll already have my decision made based on what I expect to find before looking. Neither of those guarantees success, but there are two other techniques that do).

  • bitbucket-25253 (3/5/2010)


    kaspencer (3/5/2010)

    then one must be careful to ensure that the questions are properly phrased, in correct English

    May I point out that the SSC community includes members from countries world wide, whose native language is NOT english.

    All the more reason to ensure that correct English is used. I know enough French to stand a reasonable chance of understanding a sentence in standard French. But show me one in badly worded, mis-spelled, ungrammatical French, and I'll struggle!

  • I'll give you one right now as i have already seen it posted in other threads: Wait a day, the next days email newsletter contains the answer to the previous days question.

  • Toreador (3/5/2010)


    bitbucket-25253 (3/5/2010)


    kaspencer (3/5/2010)

    then one must be careful to ensure that the questions are properly phrased, in correct English

    May I point out that the SSC community includes members from countries world wide, whose native language is NOT english.

    All the more reason to ensure that correct English is used. I know enough French to stand a reasonable chance of understanding a sentence in standard French. But show me one in badly worded, mis-spelled, ungrammatical French, and I'll struggle!

    Steve doesn't do a lot of editting on QotD or articles. As he says, he prefers that the author's voice be heard.

    He will correct gross errors, but beyond that not much.

  • Lynn Pettis Posted Today @ 10:36 AM

    I'll give you one right now as i have already seen it posted in other threads: Wait a day, the next days email newsletter contains the answer to the previous days question.

    I wondered about that, and for my last published QOD (Creating a Trigger on a View published 2/24/2010) I tracked the results for a week. Although the number of people answering the question increased, the percentage of correct answers advanced from 67 percent on the first day to 67.3 percent by the 7th day. Not something I considered significant. True the question was not difficult and that may have some bearing on the matter.

    Having 4 additional questions scheduled for publication between now and my birthday in April I will continue tracking to attempt to determine if this experience is typical.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • If you are listening Steve, these CTE's are great fun and make great questions!

    Jamie

Viewing 15 posts - 76 through 90 (of 110 total)

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