Solved

Help in Understanding this oracle query

Posted on 2007-04-09
4
566 Views
Last Modified: 2013-12-18
i have a query like below:
select test_id,type,status,serial,item,operation,
     station,start_time,end_time,
     utl.blob2clob.compressor.blob_decompress(xml_data) as xmld
from test.test_data_v3
where status='CompletedNormally'
and start_time = to_date('02/12/2007','MM/DD/YYYY')
and operation = 'TxpCalAndTest';

what does this mean over here:
utl.blob2clob.compressor.blob_decompress(xml_data) as xmld

actualy the test data is stored as xml which in turn is stored as xml blob in the db

so i think this is one of the way to access the xml blob...but i cannot make head or tail out of it.
is there any document as to how to access data from oracle stored as xml blob and extract all the parameters?

thanks a lot
0
Comment
Question by:samir25
  • 3
4 Comments
 
LVL 10

Expert Comment

by:Jaax
ID: 18875246
It means it converts the XML data in a compressed format to an uncompressed/native contents so that it is intelligible. XML is stored in BLOB to conserve space, so we need to decompress it. Its like zipping and unzipping a file.
0
 
LVL 10

Expert Comment

by:Jaax
ID: 18875251
It means it converts the XML data in a compressed format to an uncompressed/native contents so that it is intelligible. XML is stored in BLOB to conserve space, so we need to decompress it. Its like zipping and unzipping a file.
0
 
LVL 1

Author Comment

by:samir25
ID: 18875324
ok little clear..
so here utl.blob2clob.compressor.blob_decompress(xml_data) as xmld
database name is utl? and blob to clob...?
then xml_data is the actual blob data in the db? can u help me understand more?
i was wondering how will i access the individual node in the xml file? do u know of any link which can help me onthis? thanks a lot
0
 
LVL 10

Accepted Solution

by:
Jaax earned 500 total points
ID: 18875534
>>utl . It is the name of the package for utilities. Doesn't seem like a oracle utility. Maybe it is used by your company
blob_decompress is the function in utl.blob2clob.compressor package.

>>then xml_data is the actual blob data in the db.
Yes

I guess when you store the entire XML document as a CLOB, you cannot access the individual node unless it is extracted/parsed.

Please refer these links for more details:
http://www.dbazine.com/olc/olc-articles/scardina1
http://www.oracle.com/technology/oramag/webcolumns/2003/techarticles/scardina_xmldb.html
http://www.lc.leidenuniv.nl/awcourse/oracle/appdev.920/a96620/xdb01int.htm
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Use of Exception to end a Loop 3 45
Sybase and replication server 13 39
Loading flat file data in tables 2 41
PL/SQl Expanding the WHERE statement in query 3 20
Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question