SQL Server 2008 and XML

  • Sreepathi1987

    Default port

    Points: 1425

    Comments posted to this topic are about the item SQL Server 2008 and XML

  • Lokesh Vij

    SSChampion

    Points: 10836

    Simple but tricky question 🙂

    ~ Lokesh Vij


    Guidelines for quicker answers on T-SQL question[/url]
    Guidelines for answers on Performance questions

    Link to my Blog Post --> www.SQLPathy.com[/url]

    Follow me @Twitter

  • Koen Verbeeck

    SSC Guru

    Points: 258965

    This question could have been so much more than just a simple trick question. Instead of focusing on attribute or element centric mapping (which you did a bit with the answers and by specifying a non-existant bit flag), you made the question a whole lot less interesting.

    The explanation doesn't even mention the different mappings and how they affect results.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • This was removed by the editor as SPAM

  • SQLWinther

    SSCertifiable

    Points: 5946

    I knew it couldn't be a simple answer, but I answered based on what it should have been if it wouldn't have been the CASE difference. I don't like questions where you have to look at case or spelling issues.

    /HÃ¥kan Winther
    MCITP:Database Developer 2008
    MCTS: SQL Server 2008, Implementation and Maintenance
    MCSE: Data Platform

  • Thomas Abraham

    SSChampion

    Points: 10761

    Thanks for submitting the question. But, my general reaction amounted to a yawn. Your focus on case made the question seem even less interesting. Also, if you use a screen shot, how about not using the entire screen? Keep trying.

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

  • TomThomson

    SSC Guru

    Points: 104773

    I got it right, but I don't like this question.

    Where (if anywhere) is it dosumented how that flag-byte 7 behaves? Nowhere, so the question is asking people to guess what it meansor carry out experiments to discover what it means. People can deduce that it doesn't mean "error" because that is not one of the options given. But they can't deduce what it actually does mean.

    Suppose the 3rd bit (starting at LS end) meant "ignore case in paths", and the second bit means "ignore bit 1" as well as what the book says: then the answer would be three rows of nulls. Alternatively suppose the 4 bit means "ignore case in paths" but the 2 bit says "ignore me if bit 1 is set" as well as what the book says it means; then the answer would be three rows with non-null values. Neither of these is the correct answer, but you can't tell that from the documentation. Note that either the 2 bit overrides the 1 bit or the 1 bit overrides the 2 bit or we get an error when both are set; as we don't get an error, people can deduce that there is something undocumented is happening.

    In fact the 4 bit doesn't mean anything (so far as I can tell - I can't prove it, I've played around enough to believe it but not enough to be reaonably sure of it), and the 2 bit overrides the 1 bit (at least some of the time; I suspect all the time). But how are people expected to know that, without going and playing with it?

    In a context other than QotD, I would definitely approve of a question that makes people go and play with things to get the answer, but I think QotD should require at most a bit of research in the documentation and people mostly won't have time to do more than that, so this question is going to leave people to make a guess or decline to answer (apart from a few, like me, who have already played around a bit). I don't like that.

    Tom

  • (Bob Brown)

    SSCrazy

    Points: 2705

    Great question. I'm getting more into XML from SQL and this was a good test.

  • Mike Is Here

    Hall of Fame

    Points: 3348

    Good question, I knew the answer from personal experience. :blush:

  • sestell1

    SSChampion

    Points: 10230

    L' Eomot Inversé (8/1/2012)


    I got it right, but I don't like this question.

    Where (if anywhere) is it dosumented how that flag-byte 7 behaves? Nowhere, so the question is asking people to guess what it meansor carry out experiments to discover what it means. People can deduce that it doesn't mean "error" because that is not one of the options given. But they can't deduce what it actually does mean.

    Suppose the 3rd bit (starting at LS end) meant "ignore case in paths", and the second bit means "ignore bit 1" as well as what the book says: then the answer would be three rows of nulls. Alternatively suppose the 4 bit means "ignore case in paths" but the 2 bit says "ignore me if bit 1 is set" as well as what the book says it means; then the answer would be three rows with non-null values. Neither of these is the correct answer, but you can't tell that from the documentation. Note that either the 2 bit overrides the 1 bit or the 1 bit overrides the 2 bit or we get an error when both are set; as we don't get an error, people can deduce that there is something undocumented is happening.

    In fact the 4 bit doesn't mean anything (so far as I can tell - I can't prove it, I've played around enough to believe it but not enough to be reaonably sure of it), and the 2 bit overrides the 1 bit (at least some of the time; I suspect all the time). But how are people expected to know that, without going and playing with it?

    In a context other than QotD, I would definitely approve of a question that makes people go and play with things to get the answer, but I think QotD should require at most a bit of research in the documentation and people mostly won't have time to do more than that, so this question is going to leave people to make a guess or decline to answer (apart from a few, like me, who have already played around a bit). I don't like that.

    +1

    Interesting question, but...

    I answered the question correctly based on the fact that the root didn't have the correct case, but only after I gave up trying to find documentation on the flag value of 7 and tested the flag values effect on some xml code I had.

    If it was the case sensitivity of the rowpattern, I would have used simple documented values for the flag. If the point of the question was the behavior of the undocumented flag value, I personally would have set up the code in the question to allow copy-paste for experimentation, since there would be no other way to determine it's behavior.

  • Mighty

    SSCrazy Eights

    Points: 8815

    I agree with some of the others: I COULD have been a good question.

    How could we possible know if the incorrect "ROOT" was put there as part of the test, or that it was just a typo, which could be ignored (like it happens more often in the QOTD)?

  • Revenant

    SSC-Forever

    Points: 42467

    Oh my, got it wrong. Thanks anyway!

  • SQLRNNR

    SSC Guru

    Points: 281243

    Thanks for the question

    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

  • Rob Schripsema

    SSCertifiable

    Points: 7469

    Thanks for the question. Though I'll agree with the others that the upper/lower case issue was not at all what I expected the point of the question to be, it's that kind of thing that gets me pulling my hair out when I can't figure out why something isn't working.

    Good reminder to pay attention to the details!

    Rob Schripsema
    Propack, Inc.

  • Lon-860191

    SSCrazy

    Points: 2449

    Good question, got it right but for the wrong, did some research and now know more about XML and SQL, Thanks.

Viewing 15 posts - 1 through 15 (of 15 total)

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