Parsing Dynamic XML to SQL Server tables with Parent and child relation
问题 I have a XML in Source Table. I need to parse this XML to 3 different tables which has Parent Child relationship. I can do this in C# but currently for this i need to implement it at SQL server side. The sample xml looks like: <ROWSET> <ROW> <HEADER_ID>5001507</HEADER_ID> <ORDER_NUMBER>42678548</ORDER_NUMBER> <CUST_PO_NUMBER>LSWQWE1</CUST_PO_NUMBER> <CUSTOMER_NUMBER>38087</CUSTOMER_NUMBER> <CUSTOMER_NAME>UNIVERSE SELLER</CUSTOMER_NAME> <LINE> <LINE_ROW> <HEADER_ID>5001507</HEADER_ID> <LINE_ID