O'Reilly logo

XML and JSON Recipes for SQL Server: A Problem-Solution Approach by Alex Grinberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

©  Alex Grinberg 2018
Alex GrinbergXML and JSON Recipes for SQL Serverhttps://doi.org/10.1007/978-1-4842-3117-3_3

3. Manipulating XML Files

Alex Grinberg
(1)
Richboro, Pennsylvania, USA
 
In Chapter 2, we discussed how to build XML from an SQL query result set. Before we begin reviewing the options on how to shred XML data, we first need to know how to store the XML result on the storage (disk, SSD drive, SAN, etc.) and how to upload an XML file into a table. This chapter will demonstrate the various options to manipulate the XML files.

3-1. Storing XML Result in a File from SQL

Problem

You want to store the XML result you generate in SQL as an .xml file.

Solution

The BCP (bulk copy program) utility allows the export of data into an XML file. When the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required