Amazingly, I have been unable to easily find an answer to this simple question.
The problem is that there are plenty of blogs/articles on using OpenXml, but the examples use the lamest, most simplistic, single-level XML documents to load.
Ok, for example, I have table Contacts with the following colums:
The XML parameter data looks like:
So, in the SPROC, to load the input XML, the SQL would resemble:
FROM OPENXML (@XML, '/Contacts',2)
WITH ( Name nvarchar (100),
My question is, how do you specify the data in nested "Phone" element?
Any and all help greatly appreciated.