If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2/zOS V8 XML2CLOB SPUFI or QMF?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-17-09, 15:52
Hugh Ross Hugh Ross is offline
Registered User
 
Join Date: Sep 2009
Posts: 2
DB2/zOS V8 XML2CLOB SPUFI or QMF?

First attempts to use XMLELEMENT function not going well. Getting either errors or no results through QMF 8.1 and SPUFI. Some variations returned what appeared to be just the length of each CLOB row. Tried SUBSTR and SUBSTRING and CASTs, with no luck either. Source tables are just catalog tables (e.g., SYSIBM.SYSTABLES), not XML data.

Simple example:
SELECT XML2CLOB(XMLELEMENT( NAME "Test", 'Test'))
FROM SYSIBM.SYSDUMMY1
WITH UR

Returns this in my QMF:
COL1
----------------
CLOB(2147483647)

Should this work in V8, or do I need to wait until we upgrade to V9?

Thanks...
Reply With Quote
  #2 (permalink)  
Old 09-17-09, 16:39
Hugh Ross Hugh Ross is offline
Registered User
 
Join Date: Sep 2009
Posts: 2
Found help in another thread. Adding VARCHAR() function around XML2CLOB made it work!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On