Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am attempting to answer #4, the screenshot represents what I am trying to do. I keep receiving error messages. What changes need to be

I am attempting to answer #4, the screenshot represents what I am trying to do. I keep receiving error messages. What changes need to be made or what can I do to make the query run successfully?

These are the instructions:

Using the "AdventureWorksDW2016CTP3" database.

  1. Select * from Person.Person Where FirstName = John For XML Auto.
  2. Click on the XML link in the results area to open the XML view.
  3. Right click on the SSMS query tab above the view, and save the file as xmlTest.xml.
  4. Construct a SQL transaction to import the xmlTest.xml results file back into SQL Server. Hint: Use the Commands OPENROWSET and OPENXML and the two stored procedures sp_xml_preparedocument and sp_xml_removedocument.
  5. image text in transcribed
Use AdventureworksDN201GCTP3 GO EVECLARE @x xml SELECT ex-D From OPENRONSET (DULK 'C:\Users\amand\Documents\SYM 488\xmlTest.xml', SINGLE_BLOB) AS Demographics (D) DECLARE @hdoc int EXEC sp xml preparedocument ehdoc OUTPUT, (x Select * From OPFNXML (@hdoc, '/Persons/Person', 2) WITH Business En LilyID inl, PersonType nvarchar(5), NameStyle nvarchar(5), FirstName nvarchar(15) MiddleName rivarchar(15) Las LName rivarchar(15), EmailPromotion nvarchar(20) rowguid nvarchar(30) ) EXEC sp xml removedocument @hdoc ulilyID10334C/Busines C....YDXCELSYPE>INS/De: ZULLT exame Lyl-OC/NameLY- 100% - Reeulte Messages The XML verse LOL 0xc000e505 CULLC Ou Line ..um: , Jee Lise KML L-X. "CIOX3u: Mag G002, Level 10, dlate 2, Procedure p_xel_propredocument, Line 1 1 rt line 21 The CYTOT 0.ription 13 'Only on concur alone in an XMT. Tent.'. Med 0179, Leve 16, Slale 3, Line 12 Could not find p l atiment with handico. Had ESIT), Tr. 16, Statoil, T. A Y A : Art, Tun 1 Ratch Star - Tinc spx.l cenu vedu gume..i Tuvaluy sup CVE LA Juml is invalid. Cration time: 261211-112-17T03:12:13.1176-163-T.: Use AdventureworksDN201GCTP3 GO EVECLARE @x xml SELECT ex-D From OPENRONSET (DULK 'C:\Users\amand\Documents\SYM 488\xmlTest.xml', SINGLE_BLOB) AS Demographics (D) DECLARE @hdoc int EXEC sp xml preparedocument ehdoc OUTPUT, (x Select * From OPFNXML (@hdoc, '/Persons/Person', 2) WITH Business En LilyID inl, PersonType nvarchar(5), NameStyle nvarchar(5), FirstName nvarchar(15) MiddleName rivarchar(15) Las LName rivarchar(15), EmailPromotion nvarchar(20) rowguid nvarchar(30) ) EXEC sp xml removedocument @hdoc ulilyID10334C/Busines C....YDXCELSYPE>INS/De: ZULLT exame Lyl-OC/NameLY- 100% - Reeulte Messages The XML verse LOL 0xc000e505 CULLC Ou Line ..um: , Jee Lise KML L-X. "CIOX3u: Mag G002, Level 10, dlate 2, Procedure p_xel_propredocument, Line 1 1 rt line 21 The CYTOT 0.ription 13 'Only on concur alone in an XMT. Tent.'. Med 0179, Leve 16, Slale 3, Line 12 Could not find p l atiment with handico. Had ESIT), Tr. 16, Statoil, T. A Y A : Art, Tun 1 Ratch Star - Tinc spx.l cenu vedu gume..i Tuvaluy sup CVE LA Juml is invalid. Cration time: 261211-112-17T03:12:13.1176-163-T

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 11th International Symposium Sstd 2009 Aalborg Denmark July 8 10 2009 Proceedings Lncs 5644

Authors: Nikos Mamoulis ,Thomas Seidl ,Kristian Torp ,Ira Assent

2009th Edition

3642029817, 978-3642029813

More Books

Students also viewed these Databases questions

Question

explain what is meant by redundancy

Answered: 1 week ago