?
Solved

Help in Understanding this oracle query

Posted on 2007-04-09
4
Medium Priority
?
585 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.
Suggested Courses

777 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