source of XML data in the db column?
Hello world
If I want to use XML data as the source of data for BI Publisher, these data can be stored in a column of data
or do I have to store the data from the source XML files in a file system?
If it can be stored in a column db - is there something I need to consider regarding the definition of the data source and the creation of the data model?
Thank you
Concerning
Andy
These data can be stored in a column of data
or do I have to store the data from the source XML files in a file system?
Yes
the data can be stored in
(1) table xmltype or clob or blob column or...
so you can analyze this column somehow by xquery or xmltable or...
(2) in the file of the bone
bfilename as therapy
xmltype( bfilename('GET_XML', xmlfilename.xml))
Tags: Business Intelligence
Similar Questions
-
My select statement fails with the error:
The ORA-19011 string buffer too small
The select statement looks like:
SELECT TO_CLOB)
XMLELEMENT ("accounts",
XMLELEMENT ("count",
XMLATTRIBUTES)
rownum AS "recordId."
To_date('20130520','YYYYMMDD') AS "datestarted."
123456 AS "previousBatchId."
56789 AS 'previousRecordId '.
),
....
.... .
.....
XMLFOREST)
SIG_ROLE AS "SignatoryRole."
To_char(TRANSFER_DATE,'YYYY-mm-DD') AS "TransferDate."
NVL(Reason,0) AS 'reason '.
) AS the 'transfer '.
)
()) AS CRDTRPT
OF ANY_TABLE;
- It looks like I can choose only 4000 characters using the SELECT statement (please, correct me if I'm wrong)
I'd use the XMLGEN package. But the environment team says no mounted drives in the future with the arrival of the EXADATA.
NO HARD DRIVE MOUNTED, NO ACCESS TO THE DATABASE DIRECTORIES
No UTL_FILE
I need to use the REEL spool the resulting XML data of the SELECT query.
SQL is a standard in my org, but I can do with a PL/SQL solution also to load data into a table (cannot use a COIL with PL/SQL)
What I do is:
- a column of type CLOB to a xml_report of the loading of the above SELECT query table
- Then using SELECT * FROM xml_report to SPOOL the data to a file report.xml
No need of XMLTYPE data behind. Xml data stream is fine for me.
In addition, I need to validate the XML file, also using XSD.
Problem is that the resulting lines of the select query are supposed to be from 15000 to 20000 bytes long.
Oracle database version: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
A Suggestion or a solution to this problem would be appreciated.
(Sorry for the use of "BOLD", just to make it more readable and highlight the imp points)
Bravo!
Rahul
It looks like I can choose only 4000 characters using the SELECT statement (please, correct me if I'm wrong)
You use the right method.
There is an implicit conversion from XMLType to the data type VARCHAR2 as expected by the function TO_CLOB, where the limitation, and the error.
To serialize XMLType to CLOB, use the XMLSerialize function:
SELECT XMLSerialize (DOCUMENT
XMLELEMENT ("accounts",
...
)
)
OF ANY_TABLE;
For the rest of the requirement, I wish you good luck trying to spool the XML correctly.
You may need to play around with the SET LONG and SET LONGCHUNKSIZE commands to operate.
-
Insert XML data from the Table->; back to null
Dear Experts,
-I have table xml as below:
Example of CREATE TABLE (XML_spec XMLTYPE);
Insert in the example
Select ' < name of Message = "dataStaticInvestor" type = "IncomingMessage" >
< name of field = "batchReference" > OPENINGBATCH000000 < / field > < List name = "data" >
< = record name "data" >
< name of field = "externalReference" > 01234567890aaaaaaa < / field >
< name of field = "participantID" > OD001 < / field >
< name of field = "participantName" > EQUITY SECURITIES INDONESIA, PT < / field >
< / recording >
< = record name "data" >
< name of field = "externalReference" > 01234567890aaaaaaa < / field >
< name of field = "participantID" > OD001 < / field >
< name of field = "participantName" > EQUITY SECURITIES INDONESIA, PT < / field >
< / recording >
< = record name "data" >
< name of field = "externalReference" > 01234567890aaaaaaa < / field >
< name of field = "participantID" > OD001 < / field >
< name of field = "participantName" > EQUITY SECURITIES INDONESIA, PT < / field >
< / recording >
< / list >
< / message > ' double.
Select * example;
create table hasil1 (c1 varchar2 (500), c2 varchar2 (500), c3 varchar2 (500));
-This step I create the procedure to insert xml data into the table as the batch.
DECLARE
x XmlType;
BEGIN
Select XML_SPEC in x for example;
insert into hasil1
SELECT
p.Extract('/Record/Field/@externalReference').getstringval (C1),
p.Extract('/Record/Field/@participantID').getstringval (C2),
p.Extract('/Record/Field/@participantName').getstringval () as c3
TABLE (XMLSequence (Extract(x,'Message/List/Record'))) p;
commit;
END;
/
-when the result of select hasil1, the output is back 3 rows and 3 columns, but all data is a null *.
Best regards
SigcleYou don't explain what output you need, but I guess something like this:
SQL> insert into hasil1 (c1, c2, c3) 2 select x.c1, x.c2, x.c3 3 from example t 4 , xmltable( 5 'Message/List/Record' 6 passing t.xml_spec 7 columns c1 varchar2(500) path 'Field[@name="externalReference"]' 8 , c2 varchar2(500) path 'Field[@name="participantID"]' 9 , c3 varchar2(500) path 'Field[@name="participantName"]' 10 ) x 11 ; 3 rows inserted SQL> select * from hasil1; C1 C2 C3 ---------------------- --------- -------------------------------- 01234567890aaaaaaa OD001 EQUITY SECURITIES INDONESIA,PT 01234567890aaaaaaa OD001 EQUITY SECURITIES INDONESIA,PT 01234567890aaaaaaa OD001 EQUITY SECURITIES INDONESIA,PT
-
Hi all
I have an XML (emp.xml) with data below:
-< root >
-< row >
< name > steve < / lastname >
< 30 > < / Age >
< / row >
-< row >
< name > Paul < / lastname >
<>26 < / Age >
< / row >
< / root >
I would like to create a stored procedure to store the xml data into the EMP table.
EMP
LastName age
Steve 30
Paul 26
I tried to watch all threads related to this forum, but cannot find the right wire. Any help is greatly appreciated. Thank youWith
SQL> select * from xmltable('root/row' passing xmltype('
steve 30 Paul 26 You can now just make a
Insert into emp as select...
-
Read the data in the first column selected in a multicolumn listbox
When a line is selected in a ListBox multicolumn (1 point), how can I go on reading the data in the first column?
The listbox multicolumn itself is the digital picture data type. If you have allowed only 1 point selection and selection mode select any row, it returns the line number. The property node 'Element names' to return a table 2d-chains of the elements in your Inbox. The index of the row to the value of the listbox and column 0. See code attached.
-
Filtering XML data in the grid
I can't sem to figure out how to filter my XML data before entering my data grid. I want to load only the XML data with the ID 'BALUSTER' attribute and have tried to enter:
data_grid. DataProvider dp =. (@ID IS 'BALUSTER');
in my function xmlLoaded without success. I'm fairly new to as3 and could certainly use the help. Thank you.
var dpataProvider;
var products_xml:XML;
var xmlReq:URLRequest = new URLRequest("data/products.xml");
var xml_loader:URLLoader = new URLLoader();
function xmlLoaded(event:Event):void {}
var ldr:URLLoader = event.currentTarget as URLLoader;
var xmlDP:XML = new XML (ldr.data);
DP = new DataProvider (xmlDP);
data_grid. DataProvider = dp;
}
xml_loader. Load (xmlReq);
xml_loader.addEventListener (Event.COMPLETE, xmlLoaded);Assign the filtered data (not the original) to the data provider:
function xmlLoaded(event:Event):void {}
var ldr:URLLoader = event.currentTarget as URLLoader;
var xmlDP:XML = new XML (ldr.data);
var data: XML =
data.setChildren (xmlDP.PRODUCTS. (@ID) IS 'BALUSTER'));
DP = new DataProvider (data);
data_grid. DataProvider = dp;
} -
Catch / know the XML data in the form of PDF (without doing send XML)
It is possible from a PDF form using get JS / know the XML data in the current form?
I need to get the same XML data that would be generated with the "export data" function to Adobe Professional.
THX!
OK now I get... You can use the command:
xfa.datasets.data.saveXML ("pretty")
Paul
-
Insert XML data into the MySQL database
Hi all, I'm new with XML and I need help with the insertion of XML data in the mysql database using coldfusion. I looked on the Coldfusion Documentation and saw how to convert XML to a Coldfusion query... but there was no example of how to do an insert. If anyone can give me a good example or point me towards a good direction on how to do it, I would really appreciate it.
Thank you very much in advance
AlfieNevermind, I finally managed to do work!
-
XML data in the table using sql/plsql
Hi experts,
Could you please help with the following requirement. I have the tags xml (.xml on a server file) below. I need to access this file and read the XML and insert into the db table using sql and plsql. Is it possible with the cdata below? And there is a nested this table.
Could someone please guide me if you have a sample code file and xml.
<? XML version = "1.0" encoding = "UTF-8"? >
< generation_date > <! [CDATA [17/11/2015]] > < / generation_date >
< generated_by > <! [CDATA [Admin Admin]] > < / generated_by >
< year > <! [CDATA [2015]] > < / year >
< month > <! [CDATA [01]] > < / month >
< author >
< author > <! [CDATA [user author]] > < / author > < author_initial > <! [CDATA [user]] > < / author_firstname > < author_country > <! [CDATA [author]] > < / author_lastname >
< author_email > <! [CDATA [[email protected]]] > < / author_email >
< author_data_01 > <! [CDATA []] > < / author_data_01 >
< author_data_02 > <! [CDATA []] > < / author_data_02 >
< items >
< article_item >
< article_id > <! [CDATA [123456]] > < / article_id >
< publication > <! [CDATA [Al Bayan]] > < / publication >
< section > <! [CDATA [Local]] > < / section >
< issue_date > <! [CDATA [11/11/2015]] > < / issue_date >
< page > <! [CDATA [2]] > < / print this page >
< article_title > <! [CDATA [title.]] > < / article_title > < number_of_words > <! [CDATA [165]] > < / number_of_words >
< original_price > <! [CDATA [200]] > < / original_price >
< original_price_currency > <! [CDATA [DEA]] > < / original_price_currency >
< price > <! [CDATA [250]] > < / price >
< price_currency > <! [CDATA [DEA]] > < / price_currency >
< / article_item >
< / articles >
< total_amount > <! [CDATA [250]] > < / total_amount >
< total_amount_currency > <! [CDATA [DEA]] > < / total_amount_currency >
< / author >
< / xml >
Thanks in advance,
Suman
XMLTABLE using...
SQL > ed
A written file afiedt.buf1 with t (xml) as (select xmltype ('))
2 ") of the double)"
3
4
5
6
7
8
9
10
11
[[12[email protected]]] >
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34-
35 end of sample data
36-
37 - assumptions:
(38 - a) XML may have several tags
(39 - b) eachmay contain more
40-
41 select x.gen_by, x.gen_date, x.mn, x.yr
42, y.author, y.auth_fn, y.auth_ln, y.auth_cnt, y.auth_em, y.auth_d1, y.auth_d2
43, z.id, z.pub, z.sec, z.iss_dt, z.pg, z.art_ttl, z.num_wrds, z.oprice, z.ocurr, z.price, z.curr
44 t
45, xmltable ('/ authxml')
from $ 46 t.xml
path of 47 columns gen_date varchar2 (10) '. / generation_date'
48, path of varchar2 (15) of gen_by '. / generated_by'
49, path of varchar2 (4) year '. "/ year"
50 varchar2 (2) mn road '. "/ month"
51, path of xmltype authors '.'
52 ) x
53, xmltable ('/ authxml/authors ')
from $ 54 x.authors
author of 55 path of varchar2 columns (15) '. / author'
56, path of varchar2 (10) of auth_fn '. / author_firstname'
57, path of varchar2 (10) of auth_ln '. / author_lastname'
58 road of VARCHAR2 (3) auth_cnt '. / author_country'
59 road of varchar2 (20) of auth_em '. / author_email'
60 road of varchar2 (5) of auth_d1 '. / author_data_01'
61, path of varchar2 (5) of auth_d2 '. / author_data_02'
62, path of xmltype articles '. / Articles'
63 ) y
64, xmltable ('/ Articles/article_item ')
from $ 65 y.articles
path id 66 number columns '. / article_id'
67, path of varchar2 (10) pub '. ' / publication.
68 road of varchar2 (10) dry '. / section'
69, path of varchar2 (10) of iss_dt '. / issue_date'
70 road of VARCHAR2 (3) pg '. "/ print this page"
71, path of varchar2 (20) of art_ttl '. / article_title'
72, path of varchar2 (5) of num_wrds '. / number_of_words'
73, path of varchar2 (5) of oprice '. / original_price'
74 road to VARCHAR2 (3) ocurr '. / original_price_currency'
75, path of varchar2 (5) price '. "/ price"
76, path of VARCHAR2 (3) curr '. / price_currency'
77* ) z
SQL > /.GEN_DATE GEN_BY YEAR MN AUTHOR AUTH_FN AUTH_LN AUT AUTH_EM AUTH_ AUTH_ ID PUB DRY ISS_DT PG ART_TTL NUM_W OPRIC HEARTS PRICE OCU
---------- --------------- ---- -- --------------- ---------- ---------- --- -------------------- ----- ----- ---------- ---------- ---------- ---------- --- -------------------- ----- ----- --- ----- ---
17/11/2015 Admin Admin 2015 01 user author user author [email protected] 123456 UAE Al Bayan Local 11/11/2015 2 is the title. 165 200 AED AED 250Of course, you'll want to change the types of data, etc. as needed.
I assumed that the XML can contain several "
" sections and that each section can contain several entries. Thus the XMLTABLE aliasing as 'x' gives information of XML, and supplies the data associated with the XMLTABLE with alias 'y' which gets the multiple authors, which itself
section of the XMLTABLE with alias 'z' for each of the article_item. CDATA stuff are handled automatically by SQLX (XML functionality integrated into Oracle's SQL)
-
XMLP: How to display row XML field in the same column
Hello
I show a particulare column in my group of LINE in a single cell of table RTF?
Example of XML data:
< L_LINE_GROUP >
< G_LINES >
< LINE_ID > 1 < / LINE_ID >
< ELEMENT > POINT A1 < / ITEM >
< / G_LINE >
< G_LINES >
< LINE_ID > 2 < / LINE_ID >
A2 POINT < ITEM > < / ITEM >
< / G_LINE >
...
< / L_LINE_GROUP >
I show the ITEM as a concatenated in a table field.
as. QUESTION A1 POINT A2 A3...
I tried..? for each: G_LINES? > <? G_LINES? > <? end foreach? > inside the cell, it prints inside the cell, but each element of the new line. I need to display as a concatenated string.
Thanks for supporting me how in rtf.
Thank you and best regards,
Raja.
The code of the cell can be
This will ensure that the values are concatenated
-
How to display image in the data from the blob column item
Hello
This is pavan, I try to upload images in the tables and display.
I was able to download the data in the table using this http://www.apexninjas.com/blog/2011/09/uploading-and-displaying-images-in-apex/
but I'm unable to display in the report or item and also I have mentioned these http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_util.htm#AEAPI129 post but I din't get how to put an element valid POINT with the type of FILE that contains the type of source of column DB application page name.
and also, I raised the thread that also in response that he has changed the type of data that we need I don't have.
can someone help me on this please
Kind regards
Pavancreating manual p3_image point of page that is display in form of image display and check point p3_image for more information how image
in your application.
Leave.
-
extract xml data in the collection
Hello
I want to extract xml data in a collection of collection
could any body you tell me if we succeed in sql
ex:
declare
type t_code is table of number;
type r_rec is record (c_name varchar2 (100),)
c_code vrachar2 (100),
c_code_number t_code);
type t_rec is the table of the r_rec;
l_xml xmltype: = xmltype (')
< body >
<>campaign
< code > < code > CAMP_1
< description > Campaign_1 < / description >
< rateplans >
< rateplanCode > 1 < / rateplanCode >
< rateplanCode > 2 < / rateplanCode >
< rateplanCode > 3 < / rateplanCode >
< / rateplans >
< / campaign >
<>campaign
< code > < code > CAMP_2
< description > Campaign_2 < / description >
< rateplans >
< > 11 rateplanCode < / rateplanCode >
< > 22 rateplanCode < / rateplanCode >
< rateplanCode > 33 < / rateplanCode >
< / rateplans >
< / campaign >
<>campaign
< code > < code > CAMP_3
< description > Campaign_3 < / description >
< rateplans >
< > 111 rateplanCode < / rateplanCode >
< > 222 rateplanCode < / rateplanCode >
< > 333 rateplanCode < / rateplanCode >
< / rateplans >
< / campaign >
< result >
< > 00 resultCode < / resultCode >
< resultText > success < / resultText >
< / result >
(< / body > ');
Start
Select / * logic exrat value of xml in the final collection * /.
Double;
end;
I want data in the model in my final collection t_rec
CAMP_1, Campaign_1, nested_table (1,2,3)
CAMP_2, Campaign_2, nested_table (11,22,33)
CAMP_3, Campaign_3, nested_table (111,222,333)
Published by: 948596 on May 17, 2013 05:17Like this
SQL> declare 2 type t_code is table of number ; 3 type r_rec is record 4 ( 5 c_name varchar2(100), 6 c_code varchar2(100), 7 c_code_number t_code 8 ); 9 type t_rec is table of r_rec ; 10 l_rec t_rec := t_rec(); 11 l_xml xmltype := xmltype 12 (' 13 14
15 23CAMP_1
16Campaign_1 1718 221 192 203 2124 32CAMP_2
25Campaign_2 2627 3111 2822 2933 3033 41CAMP_3
34Campaign_3 3536 40111 37222 38333 3942 45 ' 46 ) ; 47 begin 48 for i in ( 49 select rownum id 50 , t1.code 51 , t1.description 52 , t2.rate_plan_code 53 , row_number() over(partition by t1.code order by t2.rate_plan_code) rno 54 from xmltable 55 ( 56 '/body/campaign' passing l_xml 57 columns 58 code varchar2(100) path 'code', 59 description varchar2(100) path 'description', 60 rate_plans xmltype path 'rateplans' 61 ) t1 62 , xmltable 63 ( 64 '/rateplans/rateplanCode' passing t1.rate_plans 65 columns 66 rate_plan_code varchar2(100) path '.' 67 ) t2 68 ) 69 loop 70 if i.rno = 1 then 71 l_rec.extend; 72 l_rec(l_rec.count).c_name := i.description; 73 l_rec(l_rec.count).c_code := i.code; 74 l_rec(l_rec.count).c_code_number := t_code(); 75 end if; 76 l_rec(l_rec.count).c_code_number.extend; 77 l_rec(l_rec.count).c_code_number(i.rno) := i.rate_plan_code; 78 end loop; 79 for i in 1..l_rec.count 80 loop 81 dbms_output.put_line(l_rec(i).c_code || ' ' || l_rec(i).c_name); 82 for j in 1..l_rec(i).c_code_number.count 83 loop 84 dbms_output.put_line(l_rec(i).c_code_number(j)); 85 end loop; 86 end loop; 87 end; 88 / CAMP_1 Campaign_1 1 2 3 CAMP_2 Campaign_2 11 22 33 CAMP_3 Campaign_3 111 222 333 PL/SQL procedure successfully completed. SQL>00 43Success 44 -
Error when inserting XML Date in the Table
Hi all
I am working on Oracle 11 g and trying to insert a date XML in the table but get error - below
Query - insert into TableName (ID, CREATION, CREATEDBY) VALUES (50, *'2010 - 12-15 T 12: 57:19'*, 'Name')
Error - java.sql.SQLDataException: ORA-01861: literal does not match the format string
CREATED column datatype is Date
When I try to use sysdate instead of hard-coding XML date of obtaining inserted successfully into the table. Please let me know how to pass this XML format date.
Thanks in advance.
Concerning
NikhilI don't see any XML in what you posted. In any case:
"2010 12-15 T 12: 57:19'.
is a string, not a date. Use:
to_date('2010-12-15T12:57:19','YYYY-mm-dd"T"HH24:mi:SS')
For example:
SQL> create table tbl(created date); Table created. SQL> insert into tbl values('2010-12-15T12:57:19'); insert into tbl values('2010-12-15T12:57:19') * ERROR at line 1: ORA-01861: literal does not match format string SQL> insert into tbl values(to_date('2010-12-15T12:57:19','YYYY-MM-DD"T"HH24:MI:SS')) 2 / 1 row created. SQL>
SY.
-
Read data from the text column in report
I have a sql report with an editable column created using apex_item.text (5);
I tried to read and insert the data from the column in a table, using this process
because me in 1.apex_application.g_f05.count
loop
insert into table (col_a, col_b)
values (apex_application.g_f05 (i), apex_application.g_f04 (i));
commit;
end loop;
end;
but without success.
The message when I execute is ORA-01403: no data found.
What is the error?HI lkefur,
Try to debug it.
The reason behind this is that your report do not have the of4, fo5 (one) as text fields at all.
try to delete value n f04 normal text and check, even to f05.
I think that most probably the reason whether shud.You can view only the source of the page and check which names are your text fields of the report to help.
Kind regards
Nandini thakur. -
Load the XML data to the UNIX server directly to Tables of database relational
Is there a way I can load some data from an XML file in the Oracle Tables, without going through the input file XML in a directory of the Oracle server. My XML file resides on the UNIX application server. And I need to load the data directly into database tables. Without load them into the database directory.
Also, I'm looking for a solution that would not load my database much and affect other processes running. Can be done using SQL Loader?
Oracle database version: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
Thanks for the companions of answers!
There I helped to learn a lot of options.
But the easiest using UNIX server that worked for me was to use an XSLT transformation to convert the XML file to a delimited file. (Load the unix server, save the Oracle resources).
UNIX 'xsltproc' feature was not a bad option.
Then use SQL Loader to load into tables.
Bravo!
Rahul
Maybe you are looking for
-
HP 2420d Watch filter failure after printing is operated
I have a HP laserjet 2420d B & W printer, and after the upgrade to El Capitan it does not print. It gives me an error message - failure of the filter. I did everything possible. ???
-
I recently created my own website at Fat Cow to announce my ebooks. I build my web pages with Microsoft Word 2010 and saving regular htm/html files (unfiltered) and then their FTPing at Fat Cow. Web pages look good on IE, but the latest versions will
-
Problem of re-installation heater D20
pulled the heat sinks to cool the thermal paste. (fan-on-top heaters) The heat sinks have small slices of blocking. When I replaced the two heat sinks all 4 washers to stop on each radiator to sit flush on the basis of aluminum, they hang about 3-4 m
-
Cannot use Windows Update, firewall, Live games. Suspects of virus?
Hello I am currently using an Alienware M17x and there are a few problems. Recently, I downloaded a game requiring a signature in Windows Live games and order I had to update the client. However, Games for Windows Live could not update and gave me an
-
Expected to a join behaviours?
Helloformalities:Select * from version of v$.Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit ProductionPL/SQL Release 11.2.0.3.0 - ProductionCORE Production 11.2.0.3.0AMT for 64-bit Windows: Version 11.2.0.3.0 - ProductionNLSRTL V