So after searching on here, I couldn't find an answer to this problem I am having.

I am trying to import StackExchange's DB Dump into SQL Server to do some testing and learning overall. However, they come in this format:

    <?xml version="1.0" encoding="utf-8"?>
  <row Id="1" PostId="1" VoteTypeId="2" CreationDate="2010-07-20T00:00:00.000" />
  <row Id="2" PostId="1" VoteTypeId="2" CreationDate="2010-07-20T00:00:00.000" />
  <row Id="3" PostId="2" VoteTypeId="2" CreationDate="2010-07-20T00:00:00.000" />
  <row Id="4" PostId="2" VoteTypeId="2" CreationDate="2010-07-20T00:00:00.000" />

Now, importing through the wizard didn't work. So here I am trying to find a way to write code or do something to import this.

The thing is, the data isn't separated by tags, but complete rows. So instead of having:

<id> 1 </id> 
<PostId> 1</PostId>

I have that thing above. So I can't exactly just take the tags and their values with something like @xData.value etc... Which is the solution I found on other posts here.

Maybe the solution is much simpler and I am missing something, donno. Your help would be appreciated

  • 2
    Have you tried SODDI? I'm not sure which importer you're talking about. My company also hosts an imported and backed up torrent of the full import already done. – Erik Darling May 28 '18 at 0:03
  • Oh wow... I am a faculty student, so there's a lot I am still learning. Didn't even know about SODDI. Thanks a lot :D It worked perfectly – Chessbrain May 28 '18 at 0:31
  • 1
    Glad to hear it worked. Good luck with your project. – Erik Darling May 28 '18 at 0:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.