Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

what is this meaning of this xquery? Expand / Collapse
Posted Wednesday, November 6, 2013 7:32 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Saturday, December 6, 2014 6:57 PM
Points: 39, Visits: 144

with reference to

originally the query is

SELECT CatalogDescription.query('
declare namespace PD="";

FROM Production.ProductModel
WHERE ProductModelID=19

and it was suggested to change the above xquery to


both query returns

<PD:Summary xmlns:PD="">
<p1:p xmlns:p1="">Our top-of-the-line competition mountain bike.
Performance-enhancing options include the innovative HL Frame,
super-smooth front suspension, and traction for all terrain.

what does /child::PD:ProductDescription[child::PD:Features]/child::PD:Summary means.

even after studying, I still could not figure out what the above query is trying to achieve?


Post #1511881
Posted Wednesday, November 6, 2013 11:11 AM



Group: General Forum Members
Last Login: Yesterday @ 9:09 PM
Points: 7,507, Visits: 17,958
It's looking for ProductDescription nodes that have one or more features nodes as children. For those ProductDescription nodes it returns the content of the Summary element.

Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Post #1511963
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse