Results 1 to 3 of 3
  1. #1
    teja is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    31

    Exclamation Import data from a XML file

    Hi all,



    I have data in a XML file. I have to import the data into the Access database. In the XML file each node has 13 child nodes. Hence, when I try to import the data, 13 new tables are formed.

    Since no 2 tables have a common column I am finding it difficult to merge the data into 1 big master table.

    Consider the example if 2 students are enrolled into the 6 subjects each and the first tab contains the list of students and the second tab contains the list of subjects, then while importing 2 tables are formed. The first table has 2 rows of students and the second table has 12 rows of their corresponding subjects. If I were to create a master table having students and their corresponding subjects I think I need a way to recognize the students with their corresponding subject using some unique identifier. Here we know the number of subjects hence we can split it into 6 and 6. but if the number of subjects is unknown then i think we need a unique identifier.

    My question - Is there any other way to make the master table with the corresponding student data without the unique identifier if the number of subjects each takes in variable.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    51,010
    Students should be in one table and their subjects should be another table. The subject table needs a field that has the student ID. I have never imported XML. If the primary/foreign key fields are not generated by the import, how can you ever determine which subject records go with which students?

    Do you want to provide file with dummy data (nothing confidential) for analysis?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    teja is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    31
    Using XSL file to transform the XML file helped in splitting the data into appropriate tables.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Import Row 1 Only on a .txt File
    By newbie in forum Import/Export Data
    Replies: 2
    Last Post: 02-08-2011, 08:23 AM
  2. Import XML file
    By randolphoralph in forum Programming
    Replies: 1
    Last Post: 01-22-2010, 09:12 PM
  3. Import prn file
    By Accessshelp@work in forum Import/Export Data
    Replies: 1
    Last Post: 10-29-2009, 09:16 AM
  4. Import a .sql file?
    By Alan in forum Import/Export Data
    Replies: 1
    Last Post: 06-03-2009, 07:52 PM
  5. CSV File Import
    By compasst in forum Import/Export Data
    Replies: 3
    Last Post: 03-31-2006, 09:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums