vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| "pai" <grpai1@yahoo.com> wrote in message news:9b7f7e0b-9412-4d9d-af5e-23d1c60b1e14@e6g2000prf.googlegroups.com... > Hi All, > > I have a field which had a field of DATA TYPE CLOB and in that > I have inserted an XML. > How can I see the contents of that XML file. > > Please Help > In future, please post information on which version of DB2 you are using and what operating system you have; this can change the answer to the question. For now, assuming that you are using DB2 V8 on Windows, it might be better for you to store your XML in an XML column. The details of how to do this and of how to get the data back out is in the manual entitled DB2 XML Extender Administration and Programming. It describes how to create a DAD file and the various other steps you should take. According to the SQL Reference for DB2 V8: "the XML data type is an internal representation of XML and can only be used as input to functions that accept this data type as input. XML is a transient data type that cannot be stored in the database or returned to an application.... Currently, the only supported operation is to serialize (by using the XML2CLOB function) the XML value into a string that is stored as a CLOB value." However, if you simply want to _see_ your XML data in its CLOB column, you can do this, assuming that: - your table name is MYCLOBS - the primary key of the table is called SEQNO - your CLOB column is called CLOB1 and you want to see the first 50 characters of the CLOB for the row whose primary key is 1: select clob(clob1, 50) from myclobs where seqno is 1 If you want to _WORK_ with your XML as a proper XML structure, I think you need to read the XML Extender Administration and Programming manual, as I mentioned above. -- Rhino |