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


XML Query


XML Query

Author
Message
Mike C
Mike C
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13924 Visits: 1173
Comments posted to this topic are about the item XML Query
MarkusB
MarkusB
SSC-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21905 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
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13924 Visits: 1173
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
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: 14693 Visits: 1407
Good question...



Miles Neale
Miles Neale
SSCertifiable
SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)

Group: General Forum Members
Points: 6679 Visits: 1698
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
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: 7321 Visits: 18732
If we win the book will it be autographed?

w00t

Chad
Mike C
Mike C
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13924 Visits: 1173
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
UDP Broadcaster
UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)

Group: General Forum Members
Points: 1438 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
Tom Thomson
Tom Thomson
SSC Guru
SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)

Group: General Forum Members
Points: 51110 Visits: 13160
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
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13924 Visits: 1173
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