Transact SQL :- XQuery – Union – Basic Study

Background Wanted to hopefully do a better job showing how to use XPath or clause. Basket Query Get Apples ( /item/type => apple ) SQL Output Get Pears ( /item/type => pear ) SQL Output Get Apples or Pears ( /item/type => apple or pear ) => Use XPath Union Outline Use XPath Union Each … Continue reading Transact SQL :- XQuery – Union – Basic Study

Transact SQL :- XQuery – Union

Background I have been working with an XML document, but never bothered looking at the DTD. Thankfully Thankfully today I found I was missing some patterns. And, so need to quickly understand how to perform Xpath OR matching; I guess it is called XPath Union. Sample XML Fragment Here is a sample XML fragment. Code … Continue reading Transact SQL :- XQuery – Union

Transact SQL – XQuery – Ancestor

Background Playing around with XML, but dug in a quicksand. XML Here is the XML Image Code Code Code Find Nodes whose element matches specific value SQL Output Pass X PATH :- Child::bar/Attribute SQL Output Find Descendants SQL Output Find Ascendants SQL Output Output - Textual Output - Image Source Code Control Git Hub TransactSQLXQuery/ancenstor/ … Continue reading Transact SQL – XQuery – Ancestor

XQuery/Transact SQL – Case Sensitivity

Background When issuing XPath queries, XQuery in SQL, one has to keep in mind that though the database itself could be defined as case-insensitive, XML is case-sensitive.   Create & Populate Data Create Table SQL Populate Table with data SQL Data   Queries Normal Queries Fetch all data Fetch data whose part name is Teeth … Continue reading XQuery/Transact SQL – Case Sensitivity

Transact SQL – Get XML Attribute Value

Background Trying to get an XML Attribute's value, but ran into error. XML Fragment Image Code Code Prepare Data SQL Error Error - Top-level attribute nodes are not supported SQL Error Error - Image Error - Textual Remediation Datatype - XML - Value Function Objective Use /song to track down to the node We will … Continue reading Transact SQL – Get XML Attribute Value

XPath code Generator – Web Tools

Background Wanted to quickly review freely available online tools for generating Xpath from XML documents. Sample XML Documents Will use these XML documents as samples :- Microsoft Docs. / NET / C# Guide / Programming guide / Programming concepts / LINQ Sample XML File: Customers and Orders in a Namespace Link   Tools Xmltoolbox XPath … Continue reading XPath code Generator – Web Tools