Solved

Help in Understanding this oracle query

Posted on 2007-04-09
4
554 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
>>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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
oracle global variables 4 51
Value of 0's not appearing. 9 49
oracle query help 36 65
null value 14 57
Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

771 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now