Click here to Skip to main content
15,394,786 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
<Request Activity="Drug Release">  
<prop mapToPropertyName="KitTypeDescription" value="Active 1 - 5mg" />  
<prop mapToPropertyName="MaterialTypeNum" value="1" />  
<prop mapToPropertyName="SeqNumMin" value="11451" />  
<prop mapToPropertyName="SeqNumMax" value="11550" />  
<prop mapToPropertyName="RetainedKitNums" value="11547,11548" />  
<prop mapToPropertyName="Quantity" value="100" />  
<prop mapToPropertyName="QuantityRetained" value="2" />  
<prop mapToPropertyName="NetQuantity" value="98" />  
<prop mapToPropertyName="CreateNewLot" value="True" />  
<prop mapToPropertyName="MfgNum1" value="AY_Kit1" />  
<prop mapToPropertyName="MfgNum2" value="AY_Kit1" />  
<prop mapToPropertyName="MfgNum3" value="21" />  
<prop mapToPropertyName="SiteId" value="8fa1cfd9-c1e3-ea11-a403-000d3a315063" />  
<prop mapToPropertyName="SiteNum" value="D149" />  
<prop mapToPropertyName="ExpiryDt" value="08 Apr 2026" />  
<prop mapToPropertyName="fgCountries">    
<prop>      
<prop mapToPropertyName="ComboKey" value="5d04d839-56d3-ea11-80d5-000d3a315413_2d9dcfd9-c1e3-ea11-a403-000d3a315063" />      
<prop mapToPropertyName="StudyName" value="AZ Extension v3" />     
 <prop mapToPropertyName="CountryName" value="United Kingdom" />      
<prop mapToPropertyName="CountryExpiryDt" value="2026-04-08T00:00:00" />    
</prop>    
<prop>      
<prop mapToPropertyName="ComboKey" value="5d04d839-56d3-ea11-80d5-000d3a315413_2e9dcfd9-c1e3-ea11-a403-000d3a315063" />     
 <prop mapToPropertyName="StudyName" value="AZ Extension v3" />      
<prop mapToPropertyName="CountryName" value="United States of America" />     
 <prop mapToPropertyName="CountryExpiryDt" value="2026-04-08T00:00:00" />   
 </prop>  
</prop>  
<prop mapToPropertyName="RequestNum" value="D149023" /></Request>
XML



What I have tried:

I have one column(activitydata) in a table which is in xml format. Need to convert it into table data
Posted
Updated 6-Feb-22 1:37am

1 solution

Working with XML data and how to convert. Create a table according to your structure and please follow the link for conversion.
https://www.sqlshack.com/working-with-xml-data-in-sql-server/[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900