Trying To Load A XML File Into Multiple Tables

Oct 8, 2010

I've been given the task of importing an XML file into multiple tables within our database using PL / SQL and I am wondering what the best approach would be.

The files will be quite large and I need the code to be as flexible as possible.

View 1 Replies


ADVERTISEMENT

Server Utilities :: Load Multiple Tables From SQL* Loader?

Nov 1, 2011

I Have Flat file with 20columns of data,My intention is to load into two tables(i.e TABLE1 WITH 10 columns,TABLE2 With remaining 10columns)

View 5 Replies View Related

PL/SQL :: Create Multiple External Tables From Same Flat File?

Nov 28, 2012

using oracle 10g currently create many external tables like so..

CREATE TABLE "XT_UNITS"
(

"Q1_2012" VARCHAR2(25 BYTE),
"Q2_2012" VARCHAR2(25 BYTE),
"Q3_2012" VARCHAR2(25 BYTE),
"Q4_2012" VARCHAR2(25 BYTE)
[code]....

is there any way I can use 1 flat file (csv) to populate many external tables ?

View 4 Replies View Related

Server Utilities :: Loading Multiple Input Files Into Multiple Tables

Jul 9, 2012

NGFID;RECTYPE;RECNAME
25;7;POLES
PARENT
CHILD;1401;9845075;2020
817;8;SUPPORT
PARENT
CHILD

Required output:-

AREA_SRNO = 1
AREA_NAME = '3rivieres.export.ngf'

File :-mauri.export.ngf

NGFID;RECTYPE;RECNAME
257;7;POLES
PARENT
CHILD;1401;9845075;2020
8174;8;SUPPORT
PARENT
CHILD

Required output:-

AREA_SRNO = 2
AREA_NAME = 'mauri.export.ngf'....etc

CREATE TABLE NGF_REC_LINK
(
AREA_SRNO NUMBER(2),
AREA_NAME VARCHAR2(40),
NGFID NUMBER(20),
TABLENAME VARCHAR2(40),
PARENT VARCHAR2(200),
[code].......

find the ctl file (ngf_test.ctl) and modify the ctl file as per my requirement.

View 6 Replies View Related

Forms :: Load Data From Excel With Multiple Tabs Using DDE?

Jun 7, 2010

Is it possible that we can load the data from excel to forms with multiple tabs using DDE? I tried doing it manually, but is there a programatic way that we can do it?

View 1 Replies View Related

JDeveloper, Java & XML :: Parsing And Load It Into Different Tables?

Jan 21, 2013

I'm new to XML and got a requirement to parse xml and load it into different tables.

Here is the XML file which i need to parse

<?xml version="1.0" encoding="ISO-8859-1"?>
<Interactions>
<Interaction ProductCode="ABCD" SourceCode="TEST_SRC" ExternalID="abcd1234">
<Consumer AddressLine1="9999 Test Ave" BirthDate="1939-03-19T00:00:00.000-05:00" CaptureDate="2013-01-

[code]...

XML has a parent element Interaction and each Interaction has different elements like Consumer, Campaign, Response, Survey, MultiSuppressions. Now i need to insert Consumer element data into table1, Response and Campaign elements data into table2, Survey data into Table3 and Multisuppression data into table4 with interaction number (this can be rownumber) so that i can link all the tables based on interaction number.

I googled on parsing xml and found xmltable can be used to parse xml. I wrote below procedure, but it will not work if i include MultSuppressions (will get cartesians).

create table table1 (interaction_id number,
sourcecode varchar2(20),
externalid varchar2(20),
productcode varchar2(20),
Addressline1 varchar2(40),

[code]...

View 15 Replies View Related

Server Utilities :: Sql Loader To Load In Multiple Table With IN Predicate?

May 17, 2012

load data in multiple table using sql loader. I have IN predicate which i don't know is allowed in the sql loader or not

my control file and is as below

LOAD DATA
INFILE 'c: empdemo05.dat'
BADFILE 'c: empad05.bad'
DISCARDFILE 'c: empdisc05.dsc'
REPLACE

[code]....

i am getting below error when executing above error

SQL*Loader-350: Syntax error at line 5.
Expecting "(", found keyword when.
WHEN DEPTNO IN ('

View 4 Replies View Related

Load Data Into Various Tables Through Perl Script Using Sql Loader?

Nov 3, 2006

I am trying to load data into various tables through a perl script using sql loader. Log files are created which say rows successfully loaded, but there is no data in the database. is there any way of explicitly saying commit with sql loader command (except for the rows options, Ihave tried using that also, with rows=1, but it doesn't work)?

View 1 Replies View Related

Client Tools :: Load Tables From SQL Server To Oracle

Jan 31, 2013

best method (easy and efficient) to load tables from sql server database to oracle database.

View 2 Replies View Related

Server Utilities :: Load Data Into More Tables From Many Files

Jan 20, 2012

I want to load data into more tables from many files ,based on first column value,which is FILLER field.i am trying to test this scenario with two oracle tables with similar definition. and load one record on each table using WHEN/POSITION keywords. for this , i added first column as reference column in the data which i have in ctl file itself.

1st table loaded with 1st record. But, 2nd record not loading.if i missed anything with WHEN/POSITION keyword ?

This is the error in log file for 2nd table(WD1):

Record 2: Rejected - Error on table WD1, column TAB.
ORA-01841: (full) year must be between -4713 and +9999, and not be 0

Table WD1:
0 Rows successfully loaded.
1 Row not loaded due to data errors.
1 Row not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
[code]....

View 9 Replies View Related

Server Utilities :: To Load Single Column Data Into Multiple Columns

Mar 26, 2012

I want to load single column data into multiple columns.

View 3 Replies View Related

Application Express :: Data Load Tables - Shared Components

Oct 7, 2013

There is a section that is called Data Loading in Shared components in every application that says: A Data Load Table is an existing table in your schema that has been selected for use in the data loading process, to upload data. Use Data Load Tables to define tables for use in the Data Loading create page wizard. The question is: How ca i select a table in my schema for use in the data loading process to upload data using the wizard? There is a packaged application that is called Sample Data loading. That sample is use for specific tables right? I tried to change those tables for the ones that I want to use but I could not because I could not add the tables that I want to use....

View 4 Replies View Related

Server Administration :: Partitioned Tables For 30+ GB Table Which Load Very Slow In Front End GUI

May 13, 2013

that are my biggest tables

Users use front end (called ESS Console) and when they try to open one of those tables they wait very long (really bad performance). Sometimes the GUI even hanging without displaying results.

Does Partitioned Tables feature works for better performance?

View 3 Replies View Related

Server Utilities :: Load 780 CSV Files Into 12 Tables Created In Database - Sql Loader?

Jul 22, 2011

I have 780(12*65) csv files generated from 65 databases.Now I have to load this 780 csv files into 12 tables created in my database for some monitoring and reporting purpose.to call the sql loader I am plannig to create 780 lines like below.

sqlldr abc@tns/pwd control='E:htmlctlhtml_broken_jobs_rpt.ctl' log='E:htmlreportloghtml_broken_jobs_rpt.log'
sqlldr abc@tns/pwd control='E:htmlctlhtml_db_size_rpt.ctl' log='E:htmlreportloghtml_db_size_rpt.log'
sqlldr abc@tns/pwd control='E:htmlctlhtml_fragmentation_rpt.ctl' log='E:htmlreportloghtml_fragmentation_rpt.log'
sqlldr abc@tns/pwd control='E:htmlctlhtml_index_stats_rpt.ctl' log='E:htmlreportloghtml_index_stats_rpt.log'
sqlldr abc@tns/pwd control='E:htmlctlhtml_invalid_object_rpt.ctl' log='E:htmlreportloghtml_invalid_object_rpt.log'
sqlldr abc@tns/pwd control='E:htmlctlhtml_long_running_queries_rpt.ctl' log='E:htmlreportloghtml_long_running_queries_rpt.log'

we know creating 780 control files is the difficult task.So I have created only 12 control files. is there any mechanism to pass a varible (planning to declare it in the sqlldr line) to the infile clause like below in sql loader?

infile "E:htmlreportoutput&a_html_broken_jobs_rpt.csv"

here a is the variable name. it will change every 12 csv files once.

or

is there anyother way to achive this?

View 8 Replies View Related

Forms :: Load PDF Data From C Drive To Oracle Tables To Respective Columns In 6i?

Sep 7, 2012

how to load the pdf data from c drive to the oracle tables to their respective columns in forms 6i.

View 4 Replies View Related

SQL & PL/SQL :: Load Data To File?

May 24, 2012

I have a table in oracle and i want to load data to flat file which is present on the server. how to and where to provide the destination file location to load the flat file.

Can it be also provided in the plsql program.

View 6 Replies View Related

PL/SQL :: How To Load XML File Into Database

Sep 14, 2012

I've always only loaded data into the database by using SQL-Loader and the data format was Excel or ASCII

Now I have to load a XML.

How can I do?

The company where I work has Oracle vers. 8i

View 5 Replies View Related

TNSNAMES Sub File Load Possible

Apr 22, 2013

Possible to call a tnsnames file from master tnsnames like the principle of ifile in the init.ora...My primary tnsnames.ora has a lot of development entries which are repointed frequently, it would work with logistics if I could manage these in a second tns file and load from primary so when my dev instances are repointed I'm not editing the master tnsnames

View 4 Replies View Related

PL/SQL :: How To Load XML File Into Table

Jun 13, 2013

I've been working on Oracle for many years but fot the first time I was asked to load a XML file into a table.As an example, I've found this on the web, but it doesn't work. the file acct.xml is this:

 <?xml version="1.0"?><ACCOUNT_HEADER_ACK><HEADER><STATUS_CODE>100</STATUS_CODE><STATUS_REMARKS>check</STATUS_REMARKS></HEADER><DETAILS><DETAIL><SEGMENT_NUMBER>2</SEGMENT_NUMBER><REMARKS>rp polytechnic</REMARKS></DETAIL><DETAIL><SEGMENT_NUMBER>3</SEGMENT_NUMBER><REMARKS>rp polytechnic administration</REMARKS></DETAIL><DETAIL><SEGMENT_NUMBER>4</SEGMENT_NUMBER><REMARKS>rp polytechnic finance</REMARKS>[code]......

 For the two tags HEADER and DETAILS I have the table: 

create table xxrp_acct_details(status_code number,status_remarks varchar2(100),segment_number number,remarks varchar2(100)); 

before I've created a create directory test_dir as 'c:esterno'; --

where I have my acct.xml and after, can you give me a script for loading data by using XMLTABLE? I've tried this but it doesn't work: 

DECLARE acct_doc xmltype := xmltype( bfilename('TEST_DIR','acct.xml'), nls_charset_id('AL32UTF8') );BEGIN insert into xxrp_acct_details (status_code, status_remarks, segment_number, remarks) select x1.status_code,         x1.status_remarks,        x2.segment_number,         x2.remarks from xmltable(  '/ACCOUNT_HEADER_ACK/HEADER'  [code]......

This should allow me to get something like this: select * from xxrp_acct_details; Statuscode status remarks segement remarks --------------- -------------------- ------------- ------------ 100 check 2 rp polytechnic100 check 3 rp polytechnic administration100 check 4 rp polytechnic finance100 check 5 rp polytechnic logistics500 process exception 20 base polytechnic500 process exception 30500 process exception 40 base polytechnic finance500 process exception 50 base polytechnic logistics but I get:

 Error report:ORA-06550: line 19, column 11:PL/SQL: ORA-00932: inconsistent datatypes: expected - got NUMBERORA-06550: line 4, column 2:PL/SQL: SQL Statement ignored06550. 00000 -  "line %s, column %s:

%s"*Cause:    Usually a PL/SQL compilation error. and if I try to change the script without using the column HEADER_NO o keep track of the header rank inside the document: 

DECLARE acct_doc xmltype := xmltype( bfilename('TEST_DIR','acct.xml'), nls_charset_id('AL32UTF8') );BEGIN insert into xxrp_acct_details (status_code, status_remarks, segment_number, remarks) select x1.status_code,         x1.status_remarks,        x2.segment_number,         x2.remarks from xmltable(  '/ACCOUNT_HEADER_ACK/HEADER'  [code]......

I get this message: Error report:ORA-19114: error during parsing the XQuery expression:  ORA-06550: line 1, column 13:PLS-00201: identifier 'SYS.DBMS_XQUERYINT' must be declaredORA-06550: line 1, column 7:PL/SQL: Statement ignoredORA-06512: at line 419114. 00000 -  "error during parsing the XQuery expression: %s"*Cause:   

An error occurred during the parsing of the XQuery expression.*Action:   Check the detailed error message for the possible causes. My oracle version is 10gR2 Express Edition

View 3 Replies View Related

Getting Error When Try To Load The Control File

Mar 12, 2012

I am receiving errors when trying to load the control file. The errors are as follows:

SQL*Loader-500 Unable to open file (homework.ctl)
SQL*Loader-553 file not found
SQL*Loader-559 SYstem error: The system cannot find the file specified.

My control file is located directly in the C drive (C:\homework.ctl). The control file contains the following

LOAD DATA INFILE 'c:\country.dat'
APPEND INTO TABLE homework
fields terminated by ',' optionally encloded by '"'
(country, month, day)
WHEN (month='April')

On the command line, I am entering:

sqlldr system/password control=homework.ctl

View 1 Replies View Related

PL/SQL :: Load PDF File Into BLOB Field?

May 10, 2013

The SQL below successfully inserts a row into my PDF_TEMPLT table and reads the referenced pdf file into the TEMPLT field. However, the pdf stored in the blob is incomplete or somehow corrupted. It's 438655 bytes long and causes the application that uses it from the database to crash. If I load the same file into the blob field using Quest Software's Toad GUI, it's 438667 bytes (12 bytes longer), and the consuming application works fine. I have the same problem with other pdfs, too, though the difference in length varies from 2 to 17 bytes, with the SQL-loaded blob always being shorter.

why a blob loaded by this SQL would differ from one loaded via Toad, and what changes I'd need to make to this SQL to get it work properly?

DECLARE
l_dir VARCHAR2(10) := 'RPWS_DIR';
l_file VARCHAR2(30) := '5214OR_Rev_1_13.pdf';
l_bfile BFILE;

[Code]......

View 4 Replies View Related

PL/SQL :: Load Data Into A Table From LDR File?

Aug 6, 2012

how can I load data into a table from *.ldr* file? How exactly I can use such files to run in loader?

View 16 Replies View Related

Unable To Load Data In Oracle 11g From XLS File?

Sep 6, 2011

CASE 1:

when i tried to load the data i got the below error,

Error starting at line 2 in command:
INSERT INTO RECON_MATCHED_DETAILS (RECON_MATCHED_DETAIL_OID, RECON_ID, STATEMENT_DATE, EXECUTION_DATE, TRANSACTION_NUMBER, TRANSACTION_DATE, TRADE_ID, TRANSACTION_TYPE, LINK_ID, ITEM_TYPE, ASSET_CODE, ISIN, BUYSELL_INDICATOR, SETTLEMENT_DATE, CURRENCY, QUANTITY, VALUE,

[code]...

CASE 2:

i tried to load the data in oracle 11g but i'm unable to load the data,and for testing i tried with a single row of data.but surprisingly the table filled with (null)s

View 3 Replies View Related

Server Utilities :: Load From A Text File

Aug 8, 2012

I would like to load a text file into an oracle table.

View 10 Replies View Related

SQL & PL/SQL :: Load Data From Oracle To Text File?

Jun 18, 2013

I want to load data from oracle table to flat file(csv/text file). Is there SQL query to do this?

View 14 Replies View Related

Forms :: Load Data From External File?

Sep 27, 2010

We are using hand scanning machine for attendance, machine saved data in a TEXT file now I want to load data into my oracle base payroll system.

data saved in this format.
31201009240928000100000002690001
31201009240933000100000000060001

as per my understanding
20100924 is date
0928 is time
269 is employee code

but I am unable to understand, is this IN or OUT time?

View 3 Replies View Related

Server Utilities :: Load Data From LST File

Dec 14, 2011

I want to load data from LST file. The data format and control file is given below. It is loading the 1st line only. it is not loading the other lines. pls let me know what needs to be added in the control file to load this data?

Table Scan: |14-DEC-11 09:54 |xest | 16| 0|SYSTEM |ws_email|declare v_lst_suc da|14-DEC-11 08:32:39| 716444|XEST_USER
XEST_USER.X| | | | | |er.exe |te; v_nxt_sch date; | | |
EST_PING_RCV| | | | | | |cur_time varchar2(30| | |
D: 28609 out| | | | | | |); begin --select| | |
of 28609 Bl| | | | | | | last_date, next_dat| | |
ocks done | | | | | | |e into v_lst_suc, v_| | |
[code]....

View 10 Replies View Related

SQL & PL/SQL :: Load Xml File Into Table Having Xmltype Datatype?

Jul 4, 2013

I'm trying to load xml file into table having xmltype datatype, but it is throwing below given error.I even tried to load data by changing '&' into '&' but still getting same error.

Error at line 6
ORA-06512: at "SYS.XMLTYPE", line 296
ORA-06512: at line 1
31011. 00000 - "XML parsing failed"
*Cause: XML parser returned an error while trying to parse the document.
*Action: Check if the document to be parsed is valid.

Version : ORACLE 11g, Windows 7

CREATE TABLE xml_test
(
id NUMBER(5),
NAME VARCHAR2(50),
xmldata xmltype
);
INSERT INTO xml_test(id, name, xmldata) VALUES(1,'file1', XMLTYPE(bfilename('SCOTTDIR', 'TEST_XML.XML'), nls_charset_id('AL32UTF8')));

TEST_XML.XML file content:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- excelFolder:"c:CSD'TEST.XSL" -->
<File1>
<Version>1.6.1</Version>
<FileSource>Java&Conversion 1.2</FileSource>
<FileDateTime>2013-06-13T15:55:54</FileDateTime>
<Filecreatedby>Lo&ki</Filecreatedby>
<FileLocation>Bangalore</FileLocation>
</File1>

insert xmlfile having '&' data into xmltype column.

View 4 Replies View Related

Forms :: Select A File And Load CSV Data Into A Table?

Mar 16, 2010

I am new to oracle designer, forms. The requirement is to select a csv file in a form ,read the file and load selected columns from a csv file into a table.

I am using CLIENT_TEXT_IO. I want to know how to extract the data from selected columns from csv file and insert into a table if the lenth of the columns are of variable length.

Another condition is that if there are duplicate rows based on orderid then take the maximum order seq nbr.Do I need to use
temp table for this logic?

View 1 Replies View Related

SQL & PL/SQL :: Unable To Load A Flat File Through Oracle Loader?

Sep 28, 2011

Issue: Unable to load a flat file through Oracle Loader

Below is the script that is being used:

drop table dl_fact_fac_data_xtern;
create table dl_fact_fac_data_xtern
(

[Code].....

After rnning this script, it prompts that table has been created; but once I fire the select command on the table I receive the following errors :

ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01005: syntax error: found "data": expecting one of: "double-quoted-string, identifier, single-quoted-string"
KUP-01007: at line 10 column 11
ORA-06512: at "SYS.ORACLE_LOADER", line 19
29913. 00000 - "error in executing %s callout"
*Cause: The execution of the specified callout caused an error.
*Action: Examine the error messages take appropriate action.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved