0

I have an xml data as follows

<ArrayOfGMADWrapperDto >
<GMADWrapperDto>   
    <GMADHeaderDto>  
        <GMADHeaderId>0</GMADHeaderId>  
        <FileHeaderRecordType>23</FileHeaderRecordType>  
        <Version>1</Version>  
        <StartTimeStamp>2017</StartTimeStamp>  
        <OriginalFileName>GMAD</OriginalFileName>
    </GMADHeaderDto>
    <GMADDetailDtoList>
        <GMADDetailDto>
            <GMADDetailId>0</GMADDetailId>
            <GMADHeaderId>0</GMADHeaderId>
            <RecordType>23120</RecordType>
        </GMADDetailDto>
        <GMADDetailDto>
            <GMADDetailId>0</GMADDetailId>
            <GMADHeaderId>0</GMADHeaderId>
            <RecordType>23120</RecordType>
        </GMADDetailDto>
    </GMADDetailDtoList>
</GMADWrapperDto>
<GMADWrapperDto>
    <GMADHeaderDto>
        <GMADHeaderId>0</GMADHeaderId>
        <FileHeaderRecordType>23</FileHeaderRecordType>
        <Version>1</Version>
        <StartTimeStamp>20172</StartTimeStamp>
        <OriginalFileName>GMAD</OriginalFileName>
    </GMADHeaderDto>
    <GMADDetailDtoList>
        <GMADDetailDto>
            <GMADDetailId>0</GMADDetailId>
            <GMADHeaderId>0</GMADHeaderId>
            <RecordType>23120</RecordType>
        </GMADDetailDto>
        <GMADDetailDto>
            <GMADDetailId>0</GMADDetailId>
            <GMADHeaderId>0</GMADHeaderId>
            <RecordType>23120</RecordType>
        </GMADDetailDto>
    </GMADDetailDtoList>
</GMADWrapperDto>

I want to get data contains under <GMADWrapperDto> node to a table variable as rows. here, we have two sets of data under <GMADWrapperDto> . That means, we need to get two rows record in table. Please assist me.

sajan
  • 1
  • You mean You want to have two table variables with data from all GMADHeaderDto and GMADDetailDtoList nodes? – Whencesoever Jun 13 '17 at 10:34
  • Welcome to stackoverflow.com. Please take some time to read [the help pages](http://stackoverflow.com/help), especially the sections named "[What topics can I ask about here?](http://stackoverflow.com/help/on-topic)" and "[What types of questions should I avoid asking?](http://stackoverflow.com/help/dont-ask)". Also please [take the tour](http://stackoverflow.com/tour) and read about [how to ask good questions](http://stackoverflow.com/help/how-to-ask). Lastly please learn how to create a [Minimal, Complete, and Verifiable Example](http://stackoverflow.com/help/mcve). – ArturFH Jun 13 '17 at 10:59
  • No. I want to store the data inside GMADWrapperDto to a table . In my example, i have two GMADWrapperDto nodes. For example in my table, i will have one column , let it be "Content". I want to store the data from two GMADWrapperDto nodes to my Content column. Thanks in adavance! – sajan Jun 13 '17 at 11:25
  • *using sql* is not enough! Please tag with the actual RDBMS (product and version) and please read [How to ask a good SQL question](http://meta.stackoverflow.com/questions/271055/tips-for-asking-a-good-structured-query-language-sql-question/271056) and [How to create a MCVE](http://stackoverflow.com/help/mcve) – Shnugo Jun 13 '17 at 12:06

0 Answers0