1)please tel me is there any good way of getting xml from blob column or this is good? (function should not be deprecated or future it should not be discuntinue and it should be efficeant way of getting value)
2) also tel me which csid is good defalult DBMS_LOB.DEFAULT_CSID or any other
and storeage will be blob that i can not change.
create or replace
FUNCTION BLOB2CLOB(L_BLOB BLOB) RETURN CLOB IS
L_BLOB_CSID NUMBER := DBMS_LOB.DEFAULT_CSID;
V_LANG_CONTEXT NUMBER := DBMS_LOB.DEFAULT_LANG_CTX;
L_SRC_OFFSET := 1;
L_DEST_OFFSET := 1;
L_AMOUNT := DBMS_LOB.GETLENGTH(L_BLOB);
<number id= "1">one</number>
<number id= "2">two</number>
<number id= "6">six</number>
above xml is in abc table col blobcol (type is blob)
select XMLCAST(XMLQuery ('for $num in /numbers/number
where number($num/@id) > 5
order by number($num/@id)
passing by value XMLPARSE(CONTENT blob2clob(BLOBCOL) returning content)
Edited by: 944768 on Dec 29, 2012 1:21 AM
i got infromation that it is depricated that is way i am not using it.
Starting 11gR2, Oracle has deprecated many older proprietary mainly XPath 1.0 based operators
in favor of standards based XQuery syntax,
xmltype is not depricated, but using clob storage for a xmltype is. Use one of the blob storage models. See for instance http://www.liberidu.com/blog/2008/09/05/xmldb-performance-xml-binary-xml-storage-models/ But don't store a XML as clob or blob
well we where not talking about xmltype (type)
we where talking about xmltype() ( function)
so does this function comes under
older proprietary mainly XPath 1.0 based operators(depricated)
if yes then some
standard based XQuery syntax, exists . some where i read about xmlparser().
Well, I was talking about XMLtype (type ) and its constructors. And that has nothing to do XPath or Xquery or deprication.
I would suggest that you always use the most appropriate datatype for storing your data, i.e. use XMLtype for XML, clob for large text and blob for binary data.
And for the use of (depricated) Xquery or Xpath functions and operators exists another forum, XML DB