Some useful tips for using XML in SQL Server 2019 Consider replacing OPENXML with the XML nodes() function. The nodes() function is useful when you want to shred an xml data type instance into relational data. The result of the nodes() function is a rowset that contains logical copies of the original XML instances. Use CROSS APPLY to get data...
Tag: xquery
Some tips for using XML in SQL Server 2017
Some tips for using XML in SQL Server 2017 Consider using the XML data type. This data type is used to store XML documents in table columns or Transact-SQL variables. The XML data type can be used in variables, columns, or in stored procedure and function parameters. Use the XQuery value() method instead of the query() method when you want...
Querying Financial Data From Yahoo! Finance From Within Oracle Database
Querying Financial Data From Yahoo! Finance From Within Oracle Database By Yuli Vasiliev As you no doubt know, Yahoo! Finance is a web site that provides financial information, including stock quotes, stock exchange rates, international market data, and much more. The article illustrates how you can receive financial data in XML format from Yahoo! Finance, issuing queries directly from within...
Accessing Google Searches From Within Oracle Database
Accessing Google Searches From Within Oracle Database By Yuli Vasiliev This article explains how you might use Google search results in programmatic ways, consolidating those results with database data. In particular, the article covers how you might use the Google Web Search API, accessing it from within SQL queries issued in Oracle Database. It is interesting to note that although...
Using XQuery To Access XML And Relational Data
Using XQuery To Access XML And Relational Data By Yuli Vasiliev This article provides an example of how you might query both XML and relational data within a single SQL query using Oracle XQuery, demonstrating the Oracle Database’s ability to combine together different format data. In particular, you’ll look at a query that retrieves data from the DEPARTMENTS relational table...
Querying Relational Data With XQuery
Querying Relational Data With XQuery By Yuli Vasiliev This article illustrates how you might query relational data with Oracle XQuery. It also shows how you might join relational data with XML in a single SQL query, thus demonstrating the Oracle Database’s ability to work with and combine together different format data. In the following example, you query the DEPARTMENTS and...
Generating Relational Data From XML With XMLTable
Generating Relational Data From XML With XMLTable By Yuli Vasiliev Starting with 10g Release 2, Oracle Database offers a full-featured, native XQuery engine integrated with the database that can be used to accomplish various tasks involved in developing XML-enabled applications. With the help of Oracle XQuery you can construct XML data using SQL/XML functions XMLQuery and XMLTable, which provide a...
Transforming XML Data With XMLQuery in Oracle Database
Transforming XML Data With XMLQuery in Oracle Database By Yuli Vasiliev With a full-featured, native XQuery engine integrated with Oracle Database starting with 10g Release 2, you can accomplish various tasks involved in developing XML-enabled applications. With the help of Oracle XQuery you can construct XML data using SQL/XML functions such as XMLQuery and XMLTable, which provide a general interface...
Database Tables Holding Data in Oracle XML DB Repository
Database Tables Holding Data in Oracle XML DB Repository By Yuli Vasiliev This article illustrates how you might query the XMLType tables that hold the data available via Oracle XML DB Repository. In particular, you’ll look at how you might optimize XQuery queries that use functions fn:doc and fn:collection to reference the repository data, accessing the underlying storage tables directly...
SQL Server 2012 XML Optimization Tips
SQL Server 2012 XML Optimization Tips Consider using the XML data type. This data type is used to store XML documents in table columns or Transact-SQL variables. The XML data type can be used in variables, columns, or in stored procedure and function parameters. You can build, rebuild or drop XML indexes online. In SQL Server 2012, indexes that include...