SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


XML Query


XML Query

Author
Message
Mike C
Mike C
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2599 Visits: 1168
Comments posted to this topic are about the item XML Query
MarkusB
MarkusB
SSCertifiable
SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)

Group: General Forum Members
Points: 5807 Visits: 4208
Don't wanna be too picky but from the answer:
The “//*” XQuery path matches every element node in the XML document, so (b) is also incorrect.
And I thought "B" was the correct one.Wink

Markus Bohse
Mike C
Mike C
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2599 Visits: 1168
MarkusB (7/29/2008)
Don't wanna be too picky but from the answer:
The “//*” XQuery path matches every element node in the XML document, so (b) is also incorrect.
And I thought "B" was the correct one.Wink


Yes, that's a typo on my part in the explanation Smile The correct answer is (b), the explanation should have read "...so (c) is also incorrect."

Thanks!
Mike C
Anipaul
Anipaul
SSCertifiable
SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)SSCertifiable (7.3K reputation)

Group: General Forum Members
Points: 7301 Visits: 1407
Good question...



Miles Neale
Miles Neale
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3030 Visits: 1694
Very good question! Appreciate you work on this it will be valuable going forward in some of the work with xml.

Miles..

Not all gray hairs are Dinosaurs!
Chad Crawford
 Chad Crawford
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2830 Visits: 18717
If we win the book will it be autographed?

w00t

Chad
Mike C
Mike C
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2599 Visits: 1168
Chad Crawford (7/29/2008)
If we win the book will it be autographed?

w00t

Chad


Ha Smile Well, I believe my name is printed somewhere on it - that's just as good Smile
Steve Eckhart
Steve Eckhart
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1088 Visits: 8664
Speaking of winning the book, does SQL ServerCentral ever announce who the winners are in these contests? It'd be nice to see in the daily email.



Steve Eckhart
TomThomson
TomThomson
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14298 Visits: 12197
Nice clear question and answer (apart from the typo in the explanation).

BUT: the more I see of this stuff the more I think the way XML was introduced into SQL Server was stark staring bonkers.

Tom

Mike C
Mike C
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2599 Visits: 1168
Tom.Thomson (12/18/2010)
Nice clear question and answer (apart from the typo in the explanation).

BUT: the more I see of this stuff the more I think the way XML was introduced into SQL Server was stark staring bonkers.


LOL. XML has an interesting history in SQL Server. In SQL 2000 (first version with built-in XML support; very minimal XML support via OPENXML and FOR XML), the XML functionality seemed to be almost an afterthought tacked on at the last minute. In SQL 2005 XML was completely re-vamped, with significant improvements (i.e., XQuery support, FOR XML PATH), but performance (and consistent performance at that) is an area that still needs to be seriously addressed. SQL 2008 added a couple of minor tweaks to XML (i.e., "let" clause in FLWOR expressions), but more complete XQuery functions and operators (F&O) support has not been implemented -- which makes it very painful to port any useful XQuery code over to SQL Server. There's a *lot* of room for improvement in SQL Server XML support... Hopefully these issues will be addressed sooner rather than later...

Mike C
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search