I have a column with XML data as below
<SAP status="1" joint="False">
<Accs>
<Acc num="1" suffix="14"/>
<Acc num="2" suffix="15" />
</Accs>
<Post>04/27/2022</Post>
<R>0</R>
</SAP>
How can I extract both Acc num and Suffix in SQL ? I want the result as
Acc num , Suffix
1 14
2 15
Thanks
xmldata type, meaning that the XML most be well formed and valid. Storing XML doesn't break NF forms as much as doing something like storing delimited data, as the XML should be well constructed. It does have its uses; though if you need to constantly query the data (in the XML) within the database, then a normalised approach is the correct solution, yes.