1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!
club

Script for getting xml tags in sql 2012-03-07

Script for getting xml tags in sql

  1. club
    Script for getting XML tags in SQL:cool:

    Code (Text):

    SELECT DBMS_XMLGEN.getxml(
    'SELECT CURSOR(SELECT oha.order_number,
                         ola.ordered_item,
                         ola.ordered_quantity
                    FROM ont.oe_order_headers_all oha,
                         ont.oe_order_lines_all ola
                   WHERE oha.header_id = ola.header_id
                     and oha.order_number in (&order_number) order by ola.line_id) as order_detail,
           CURSOR(SELECT ohd.name, ohs.hold_comment
                    FROM ont.oe_hold_sources_all ohs,
                         ont.oe_order_holds_all ohld,
                         ont.oe_hold_definitions ohd,
                         ont.oe_order_headers_all oha,
                         ont.oe_order_lines_all ola
                   WHERE oha.header_id = ola.header_id
                     AND ola.line_id = ohld.line_id
                     and ohld.hold_release_id is null
                     AND ohld.hold_source_id = ohs.hold_source_id
                     AND ohs.hold_id =  ohd.hold_id
                     AND oha.order_number = &&order_number) as holds_detail
    FROM DUAL')
    FROM DUAL