I am attempting to both create a table, with two columns, and to insert an XML document's data into the table. I am currently unable to get the code to run, so I am unsure of what could be causing issues. Any help would be greatly appreciated. Thank you.
CREATE TABLE TestProc(
TestProcID INT IDENTITY PRIMARY KEY,
Procedures XML,
);
DECLARE @TestProcXML xml;
SET @TestProcXML =
'
<TestProc>
<Proc>
<Description>the first procedure.</Description>
<SubProc>the first inner-proc.</SubProc>
<SubProc>the second inner-proc.</SubProc>
</Proc>
<Proc>
<Description>the second procedure.</Description>
</Proc>
<Proc>
<Description>the third procedure.</Description>
</Proc>
</TestProc>
'
INSERT INTO TestProc(Procedures);
VALUESor simplySELECT