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


XML Query


XML Query

Author
Message
Mike C
Mike C
SSCertifiable
SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)

Group: General Forum Members
Points: 6547 Visits: 1172
Comments posted to this topic are about the item XML Query
MarkusB
MarkusB
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10595 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
SSCertifiable
SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)

Group: General Forum Members
Points: 6547 Visits: 1172
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
SSCrazy Eights
SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)

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



Miles Neale
Miles Neale
SSCarpal Tunnel
SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)

Group: General Forum Members
Points: 4254 Visits: 1695
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
SSCarpal Tunnel
SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)

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

w00t

Chad
Mike C
Mike C
SSCertifiable
SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)

Group: General Forum Members
Points: 6547 Visits: 1172
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.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1224 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
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26122 Visits: 12500
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
SSCertifiable
SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)

Group: General Forum Members
Points: 6547 Visits: 1172
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