Betr: [DB2-L] XML challenge

Marcel Harleman

Betr: [DB2-L] XML challenge


Maybe

SELECT XMLSERIALIZE (
XMLDOCUMENT(
XMLCONCAT (
XMLELEMENT ( NAME "blabla", colname )
)
)
AS CLOB
INCLUDING XMLDECLARATION
)
FROM creator.tablename


does work?


Regards,

Marcel.


------------------------------------------------------------------------
De Belastingdienst gebruikt e-mail niet voor de uitwisseling van
vertrouwelijke informatie met de burger of voor de bekendmaking
van beslissingen. De Belastingdienst hanteert conventies voor het
gebruik van e-mail. Deze zijn te vinden op www.belastingdienst.nl.


_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* If you are going to attend only one conference this year, this is it! *
** The best DB2 technical sessions in the world
** Independent, not-for-profit, User Run - the IDUG difference!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's Listserv

Bayard Tysor

Re: XML challenge
(in response to David Churn)
Hi Dan,

I spent a lot of time trying to debug XML stuff, and found out that I had
not been careful enough with the NAMESPACE decelerations.
Just a shot in the dark,

Tink
On Wed, Dec 8, 2010 at 10:18 AM, Dan Luksetich <[login to unmask email]> wrote:

> Folks,
> I have some XML in a string stored in a varchar field of 16,000 bytes
> EBCDIC. I am interested in an SQL statement that will convert the string
> into an XML data type such that various XML functions can then be applied
> to the XML result. Anyone done this with success? I'm currently playing
> with the XMLCAST and XMLSERIALIZE functions. I'm not getting the expected
> results.
>
> Thanks,
> Dan Luksetich
>
> _____________________________________________________________________
> * IDUG North America * Anaheim, California * May 2-6 2011 *
> http://IDUG.ORG/NA < http://idug.org/NA > *
> * If you are going to attend only one conference this year, this is it!
> *
> ** The best DB2 technical sessions in the world
> ** Independent, not-for-profit, User Run - the IDUG difference!
> _____________________________________________________________________
>
> If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is
> the home of IDUG's Listserv
>



--
B.L. "Tink" Tysor
Bayard Lee Tysor, Inc.
[login to unmask email]
401-965-2688

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* If you are going to attend only one conference this year, this is it! *
** The best DB2 technical sessions in the world
** Independent, not-for-profit, User Run - the IDUG difference!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's Listserv

Marcel Harleman

Betr: [DB2-L] XML challenge
(in response to Marcel Harleman)


Ah, so quick with enter -:)

It should be:

SELECT XMLDOCUMENT(
XMLCONCAT (
XMLELEMENT ( NAME "blabla", colname )
)
)
FROM creator.tablename


Regards, Marcel.


------------------------------------------------------------------------
De Belastingdienst gebruikt e-mail niet voor de uitwisseling van
vertrouwelijke informatie met de burger of voor de bekendmaking
van beslissingen. De Belastingdienst hanteert conventies voor het
gebruik van e-mail. Deze zijn te vinden op www.belastingdienst.nl.


_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* If you are going to attend only one conference this year, this is it! *
** The best DB2 technical sessions in the world
** Independent, not-for-profit, User Run - the IDUG difference!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's Listserv

David Churn

Re: Betr: [DB2-L] XML challenge
(in response to Marcel Harleman)
Marcel,

It returns SQLCODE=-170

DSNT408I SQLCODE = -170, ERROR: THE NUMBER OF ARGUMENTS SPECIFIED FOR
XMLCONCAT IS INVALID
DSNT418I SQLSTATE = 42605 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNXOBFF SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = 170 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION
DSNT416I SQLERRD = X'000000AA' X'00000000' X'00000000' X'FFFFFFFF'
X'00000000' X'00000000' SQL DIAGNOSTIC INFORMATION

Do you need the XMLCONCAT?

--
David Churn
Database Architect, DST Systems, Inc.

On Wed, Dec 8, 2010 at 9:26 AM, Marcel Harleman <
[login to unmask email]> wrote:

> Maybe
>
> SELECT XMLSERIALIZE (
> XMLDOCUMENT(
> XMLCONCAT (
> XMLELEMENT ( NAME "blabla", colname )
> )
> )
> AS CLOB
> INCLUDING XMLDECLARATION
> )
> FROM creator.tablename
>
>
> does work?
>
>
> Regards,
>
> Marcel.
>
> ------------------------------------------------------------------------
> De Belastingdienst gebruikt e-mail niet voor de uitwisseling van
> vertrouwelijke informatie met de burger of voor de bekendmaking
> van beslissingen. De Belastingdienst hanteert conventies voor het
> gebruik van e-mail. Deze zijn te vinden op www.belastingdienst.nl.
>
>
>
> ------------------------------
>
> [image: Independent, not-for-profit, User Run - the IDUG difference! ] < http://www.idug.org >
>
> The IDUG DB2-L Listserv is only part of your membership in IDUG. If you are
> not already an IDUG member, please register here. < http://www.idug.org/register >
>

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* If you are going to attend only one conference this year, this is it! *
** The best DB2 technical sessions in the world
** Independent, not-for-profit, User Run - the IDUG difference!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's Listserv