July 31, 2012 at 9:15 pm
Comments posted to this topic are about the item SQL Server 2008 and XML
July 31, 2012 at 11:46 pm
Simple but tricky question 🙂
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
August 1, 2012 at 12:07 am
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
August 1, 2012 at 1:52 am
This was removed by the editor as SPAM
August 1, 2012 at 3:33 am
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
August 1, 2012 at 5:19 am
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
August 1, 2012 at 6:15 am
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
August 1, 2012 at 6:24 am
Great question. I'm getting more into XML from SQL and this was a good test.
August 1, 2012 at 6:45 am
Good question, I knew the answer from personal experience. :blush:
August 1, 2012 at 7:52 am
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.
August 1, 2012 at 7:57 am
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)?
August 1, 2012 at 10:01 am
Oh my, got it wrong. Thanks anyway!
August 1, 2012 at 10:25 am
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
August 1, 2012 at 11:51 am
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.
August 1, 2012 at 3:15 pm
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 14 (of 14 total)
You must be logged in to reply to this topic. Login to reply