What is the result ? (SQLServer 2005)

  • The category for this QOD is a bit misleading. It's not strictly a Transact-SQL feature that's being highlighted here. T-SQL syntax takes care of interpreting the two single-quote marks as a literal to be included in the print result, but the "GO" statement is interpreted and executed by SQL Server Management Studio (SSMS). The multiple execution option is only available there, and would not work outside that environment. SQL 2000 Query Analyzer uses "GO" to terminate batches as well, but doesn't have the optional parameter.

    There was a discussion of this point from a couple of weeks ago when the QOD for 25 August was "Go Go Go".

  • So because I got the question wrong, because like many I checked my answer in QA before I chose it, and the question did not specifically mention the version of SQL Server nor where the query should be run, should I not get the point anyway? 😀

  • Ian Elliott (9/10/2008)


    So because I got the question wrong, because like many I checked my answer in QA before I chose it, and the question did not specifically mention the version of SQL Server nor where the query should be run, should I not get the point anyway? 😀

    Let me correct you... The version of SQL Server was mentioned.

    I think this question should worth 10 points because only users runing SSMS, people that like to run the apropriated tools for the right environment, with standard setting, would check the correct option! :P:D

  • I to tested the code in QA against SQL 2005 instance and got the following:

    Server: Msg 102, Level 15, State 1, Line 2

    Incorrect syntax near 'GO'.

    Therefore, I choose incorrectly?

    I think the question could have been worded better.

  • Not really. The question specifically stated SQL Server 2005. The assumption here is that you are using SQL Server 2005 tools, not SQL Server 2000 tools to access SQL Server 2005 database servers.

    😎

  • TyGas (9/10/2008)

    Let me correct you... The version of SQL Server was mentioned.

    Sorry I stand corrected but yes I think the wording could have been better e.g. specifically saying using SSMS would've been more accurate. I don't like questions that make assumptions for you.

    One of my favourite film quotes of all time is "Assumption is the mother of all screwups!"

    OK it's not screwups but another similar word beginning with f but I'm not going to post that 😀

  • Ian Elliott (9/11/2008)

    I think the wording could have been better e.g. specifically saying using SSMS would've been more accurate. I don't like questions that make assumptions for you.

    I agree, you can't just make assumptions when making projects for clients, for example, as you could get it wrong.

    Given the wording of the question, I think that the Incorrect syntax answer should be the correct answer as well.

  • Unfortunately (or not), I disagree. By specifying SQL Server 2005 in the question, that should automatically eliminate SQL Server 2000 tools from the equation. In my environment, currently mixed 2000/2005, the only reason I even use SQL Server 2000 tools is to look at and modify (if necessary) SQL Server 2000 DTS packages. All other activities are done using the SQL Server 2005 tools.

    😎

  • Lynn Pettis (9/11/2008)


    Unfortunately (or not), I disagree. By specifying SQL Server 2005 in the question, that should automatically eliminate SQL Server 2000 tools from the equation. In my environment, currently mixed 2000/2005, the only reason I even use SQL Server 2000 tools is to look at and modify (if necessary) SQL Server 2000 DTS packages. All other activities are done using the SQL Server 2005 tools.

    😎

    Pffeeuuuuwww ... I'm no longer the only person in the galaxy making that assumption ( with SQL2005 only to use SSMS or SQLCMD) 😀

    Altough, persons using e.g. .Net may still be a bit picky on this question :crying:

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • ALZDBA (9/11/2008)

    Pffeeuuuuwww ... I'm no longer the only person in the galaxy making that assumption ( with SQL2005 only to use SSMS or SQLCMD) 😀

    Altough, persons using e.g. .Net may still be a bit picky on this question :crying:

    Yep I agree, in a perfect world, but as this thread has now shown not everyone makes that assumption or even obeys it therefore at best the question should be noted as ambiguous.

    Don't you just love being a DBA :laugh:

  • Again, we don't work in a perfect world. How many times do we have to make assumptions in our day to day work? Users don't tell us everything we need to get them what they need, so we have to make assumptions all the time.

    To tell people who are willing to come up with QotD that they must provide completely unambiguous questions is simply , IMHO, unreasonable. They might as well just give us the answer instead of having us figure it out and get it right or wrong based on our assumtions and research.

  • ALZDBA (9/11/2008)


    Actually, I stopped using the SQL Server 2000 tools, except for working with DTS packages, as soon as I loaded SQL Server 2005 Developer Edition on my desktop systems. That was back in 2005.

    😎

  • Lynn Pettis (9/11/2008)Again, we don't work in a perfect world. How many times do we have to make assumptions in our day to day work? Users don't tell us everything we need to get them what they need, so we have to make assumptions all the time.

    Yes but that's why I ask them further questions and why I stipulate that I don't get the blame for assuming things when they have not provided me with the information I need and ask for.

    Lynn Pettis (9/11/2008)To tell people who are willing to come up with QotD that they must provide completely unambiguous questions is simply , IMHO, unreasonable. They might as well just give us the answer instead of having us figure it out and get it right or wrong based on our assumptions and research.

    While I mostly agree with you on making all questions completely unambiguous as this can sometimes be a mammoth task, how hard would it have been to say "In SQL Server 2005 (using 2005+ tools), what is the result of this query."

    Honestly I'm really not trying to be picky I just think for query questions it's not totally unreasonable to ask someone to specify the sql version and tools/versions if it is going to make a difference to the answer as not everyone will be using the same configurations and tools.

    Sorry maybe lots of people will disagree with my view and as I haven't been in this field for a long time (being a relative youngster) maybe they are correct but I'll certainly take this on board for future questions now I am aware of the std thinking.

    Thanks. 🙂

  • I've been in this field for 30+ years (started in computer operations and worked up from there). Doesn't matter how many questions you ask, at some point you have to make some assumptions based on what you have at the time. Some users don't even know what they want until you give them what they ask for and realize that isn't what they wanted at all.

    We never eliminate abiguity, just minimize it. As for the QotD, yes, they are a learning tool, but really will it matter tomorrow if you got the answer today right or wrong? What really matters is that you learned something from the question, and sometimes from the ensuing discussion.

    😎

  • Don't you just love the way a simple question - with some context - with the possibility of being ambiguous triggers a bunch of discussions.

    "Make it fool proof and they will come up with a better fool" 😉

    It just wasn't the case over here.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

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

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