Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Posts
    5

    Unanswered: select more than one element/attribute from XML document

    How can I select more than one element/attribute of same datatype from an XML document that is stored in DB2?

    The folloing SQL won't work:

    select returnedInteger ri, returnedInteger ry from xmlTable as xtb,
    table(xtb.xmlobj,locationpath1) as X,
    table(xtb.xmlobj,locationpath1) as Y;

  2. #2
    Join Date
    Mar 2003
    Posts
    33

    Re: select more than one element/attribute from XML document

    Try:


    db2 "select x.returnedvarchar as rx, y.returnedvarchar as ry from xml_docs as xtb, table(db2xml.extractVarchars(xtb.xmlobj, 'locationpath')) as x, table(db2xml.extractVarchars(xtb.xmlobj, 'locatonpath')) as y where ..."



    Originally posted by thava
    How can I select more than one element/attribute of same datatype from an XML document that is stored in DB2?

    The folloing SQL won't work:

    select returnedInteger ri, returnedInteger ry from xmlTable as xtb,
    table(xtb.xmlobj,locationpath1) as X,
    table(xtb.xmlobj,locationpath1) as Y;
    -r-

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •