Jump to content
Sign in to follow this  
chanveil

Load XML records in a normal table

Recommended Posts

I have a very simple question:I get a XML file and want to store that data in my Oracle database in a normal table.I have seen so many answers everywhere, varying from LOBs and using xDB etc.What i don't understand is why it is so difficult.When i want to load a CSV file in a table I make a very small Control File CTL and from the command prompt / command line I run the SQL Loader.Control file:load datainfile 'import.csv'into table empfields terminated by "," optionally enclosed by '"'( empno, empname, sal, deptno )command:sqlldr user/password@SID control=loader_Control_File.ctlNext I connect to the database and run SQL query:select * from emp;and i see my data as usual, I can make Crystal Reports on it, etc etcI really don't understand why this can't be done with an XML fileOracle know the fields in the table EMPThe xml file has around every field the <EMPNO> and </EMPNO>Can't be easier than that I would say.I can understand Oracle likes some kind of description of the XML table, so reference to a XSD file would be understandable.But all examples are describing LOB things (whatever that is)Who can help me to get XML data in a normal table?Thanks

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...