Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3496384
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:14:30+00:00 2026-05-18T12:14:30+00:00

Some of the columns that I am trying to load into Oracle via SQL

  • 0

Some of the columns that I am trying to load into Oracle via SQL Loader from an XML file are null. For example may have several filled but ocassionally it has some nulls.

How can I tell the SQL*Loader that some of the data will be null, or how can I deal with nulls?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T12:14:31+00:00Added an answer on May 18, 2026 at 12:14 pm

    Like jonearles suggested. I use XMLTABLE to insert XML data into relational tables. First put the XML data into a Oracle tables XMLTYPE column:

    DROP TABLE XMLTEST;
    
    CREATE TABLE XMLTEST
    (   XML_COL XMLTYPE);
    
    DECLARE
      poXML CLOB; 
    BEGIN   
      -- Store the Purchase Order XML in the CLOB variable
      poXML := '<?xml version="1.0"?>
    <zalen>
        <zaal zaal_id="1">
            <alt_id>88</alt_id>
            <display_naam>01 West 430</display_naam>
            <alt_db>exp_BB</alt_db>
        </zaal>
        <zaal zaal_id="2">
            <alt_id>170</alt_id>
            <display_naam>02 Midden 010</display_naam>
            <alt_db>exp_BB</alt_db>
        </zaal>
        <zaal zaal_id="3">
            <alt_id>173</alt_id>
            <display_naam>02 Midden 110</display_naam>
            <alt_db>exp_BB</alt_db>
        </zaal>
        <zaal zaal_id="4">
            <syl_id>F491B0A119DABE76B2F6B2C0A3E902F6</syl_id>
            <alt_id>183</alt_id>
            <display_naam>02 Oost 010</display_naam>
            <alt_db>exp_BB</alt_db>
        </zaal>
        <zaal zaal_id="5">
            <alt_id>172</alt_id>
            <display_naam>02 Oost 300</display_naam>
            <alt_db>exp_BB</alt_db>
        </zaal>
      .
      .
      .
        <zaal zaal_id="126">
            <syl_id>F491B0A119DABE76B2F6B2C0A3E901E3</syl_id>
            <alt_id>129</alt_id>
            <display_naam>HB.02.140</display_naam>
            <alt_db>exp_EE</alt_db>
        </zaal>
    </zalen>';
    
      INSERT INTO xmltest (xml_col) VALUES (XMLTYPE(poXML));
    
    END;
    /
    

    Use XMLTable function to create (or insert into) the table:

    drop table zalen;
    create table zalen as 
    select xt.zaal_id
    ,      xt.alt_id
    ,      xt.syl_id
    ,      xt.alt_db
    ,      xt.display_naam
    from xmltest xts
    ,    XMLTable('zalen/zaal' PASSING xts.xml_col 
                       columns zaal_id INTEGER PATH '@zaal_id'
                                 ,alt_id INTEGER PATH 'alt_id'
                                 ,syl_id VARCHAR2(100) PATH 'syl_id'
                                 ,display_naam VARCHAR2(100)PATH 'display_naam'
                                 ,alt_db VARCHAR2(100)PATH 'alt_db') xt;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to load some data from a text file into mysql. I
I'm trying to load some data using sql loader. Here is the top of
We are trying to load a file created by FastExport into an oracle database.
I'm trying to load the following ascii file into MATLAB using load() % some
Im facing a strange issue trying to move from sql server to oracle. in
I have a file that can contain from 3 to 4 columns of numerical
I have a lowercase thorn separated file that I need to load into a
I have an unnormalized events-diary CSV from a client that I'm trying to load
We have some columns with data that must always be in uppercase to ensure
I've got some Columns in a DataGridView that have their Binding property set to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.