Hierarchical Querey: duplicate branches and values returned when no shouldn't exist.

All,

It is a follow-up question for a discussion earlier on the problems with the DBMS_XMLGEN.newContextFromHierarchy function.  I use hierarchical queries to build a purchase order (PO) in an XML document.  The process uses 2 hierarchical queries, built IN. header information and the other relies details of the PO line. The detail line query is performed on a table that contains the row data of the PO with an underlying hierarchical structure (sample data are included below). When I run the query on the data, it returns in double branches and leaves (values).  It seems to be that pass through the same branch several times and return the results. According to Oracle, this shouldn't be the case, however, in my research on what I see it's a pretty common question that appears, but I have yet to find a solid solution to the problem.  The image below of the Oracle documentation and watch the sequence of path for these queries:

Can I use "Select Distinct" to work around this problem. It works on smaller POs, where the number of lines of all is small. However, as the number of PO lines grows and information associated with each line in. develops, it becomes untenable because it comes with a lot of course and the request ends up becoming interminably long, to the point of failure.

There are 2 branches of the data structure that is repeated according to the number of ca on the purchase order lines.  Each section of line item PO repeats as a group in a series of repetitions, which is the number of lines of ca, for example if I have 3 lines IN. I get 1,2,3, 1,2,3, 1,2,3.

Within each OP section of line is a subgroup (ItemDetail).  The Group of elements within each subgroup ItemDetail repeat at a frequency that is the number of lines of ca.  The data is repeated here looks like it pushes like a factorial, which makes it easy to see why "Select Distinct" becomes untenable for the large POs.

***  I use this code in production with the "Select Distinct" restriction, but I noticed a slight increase in the size of our point of sale, so there is real urgency to get this corrected potential disaster.

Here is the code example that uses the hierarchical query without the "Select Distinct" to pull in the line IN detail.  This code will produce the output described (and shown) by pressing against the example data set I included.

DECLARE

  linectx     DBMS_XMLGEN.ctxHandle;
  DocLength   NUMBER;              --How long is the PO Doc Clob
  fulldoc     CLOB;                --Generated XML document
  LoopVar     NUMBER;              --Loop control variable

  lineqry     VARCHAR2(2000) :=
q'[SELECT
       LVL,
       XMLELEMENT(EVALNAME MWELEMENT, TAGVAL) MWELEMENT
     FROM (SELECT
             LEVEL LVL,
             Y.XPL_TAGNAME MWELEMENT,
             Y.XPL_TAGVALUE TAGVAL,
             Y.XPL_TAGSEQ TAGSEQ,
             Y.XPL_SUBSEQ SUBSEQ,
             Y.XPL_GRPSEQ GRPSEQ,
             Y.XPL_POLINE POLINE
           FROM XMLPOLINETEST Y
           START WITH Y.XPL_PONO = :PONO
                  AND Y.XPL_POLINE = 0
                  AND Y.XPL_TAGNAME = 'LineDetail'
           CONNECT BY Y.XPL_PONO = PRIOR Y.XPL_PONO
                  AND Y.XPL_SUBSEQ = PRIOR Y.XPL_GRPSEQ
           ORDER SIBLINGS BY Y.XPL_POLINE
                            ,Y.XPL_SUBSEQ
                            ,Y.XPL_TAGSEQ)]';

  
BEGIN
  DBMS_OUTPUT.ENABLE(BUFFER_SIZE => NULL);
  DBMS_LOB.CREATETEMPORARY(fulldoc,TRUE);
  linectx := DBMS_XMLGEN.newContextFromHierarchy(lineqry);
  DBMS_XMLGEN.setBINDValue(linectx,'PONO',2286766);
  SELECT XMLSERIALIZE(DOCUMENT  
         XMLELEMENT("Record"
         ,DBMS_XMLGEN.getXMLType(linectx)
         ) AS CLOB INDENT SIZE = 2) INTO fulldoc FROM DUAL;
  DBMS_XMLGEN.Closecontext(linectx);
  DocLength := DBMS_LOB.GETLENGTH(fulldoc);
  LoopVar := 1;
  LOOP
    DBMS_OUTPUT.PUT_LINE(DBMS_LOB.SUBSTR(fulldoc,8000,LoopVar));
    LoopVar := LoopVar+8000;
    EXIT WHEN LoopVar > DocLength;
  END LOOP;
  DBMS_LOB.FREETEMPORARY(fulldoc);
EXCEPTION
  WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('Call Stack: '||DBMS_UTILITY.FORMAT_CALL_STACK||Chr(10));
    DBMS_OUTPUT.PUT_LINE('Error Stack: '||DBMS_UTILITY.FORMAT_ERROR_STACK||Chr(10));
    DBMS_OUTPUT.PUT_LINE('Error Backtrace: '||DBMS_UTILITY.FORMAT_ERROR_BACKTRACE||Chr(10));
END;

Here is a set of data in row sample PO:

XPL_PONO    XPL_POLINE    XPL_SUBSEQ    XPL_TAGSEQ    XPL_GRPSEQ    XPL_TAGNAME    XPL_TAGVALUE    XPL_ENTDT
2290872    0    0    2    28    LineDetail        05-OCT-15
2290872    1    28    1    29    Item        05-OCT-15
2290872    1    29    1    30    Cust-PO-Line-Number    1    05-OCT-15
2290872    1    29    6    31    Quantity    1    05-OCT-15
2290872    1    29    7    32    Part-Number    10501818    05-OCT-15
2290872    1    29    8    33    Revision-Level        05-OCT-15
2290872    1    29    9    34    Product-Name    CARTRIDGE, LH    05-OCT-15
2290872    1    29    10    35    Price    0    05-OCT-15
2290872    1    29    11    36    UOM    EA    05-OCT-15
2290872    1    29    12    37    Extended-Price    0    05-OCT-15
2290872    1    29    13    38    Supplier-Part        05-OCT-15
2290872    1    29    14    39    Item-Due-Date    12-OCT-15    05-OCT-15
2290872    1    29    16    40    BatchNo        05-OCT-15
2290872    1    29    17    41    SequenceNo        05-OCT-15
2290872    1    29    18    42    Release-HR        05-OCT-15
2290872    1    29    19    43    ItemDetail        05-OCT-15
2290872    1    29    2    47    Marvin-Sales-Order    A_E04704    05-OCT-15
2290872    1    29    3    48    Sales-Order-Line    1    05-OCT-15
2290872    1    29    15    49    DockID    -    05-OCT-15
2290872    1    29    4    50    Unit    A1    05-OCT-15
2290872    1    29    5    51    Sash    00    05-OCT-15
2290872    1    43    1    52    SCREENING        05-OCT-15
2290872    1    43    2    53    FINISH        05-OCT-15
2290872    1    43    3    54    Screen-Material        05-OCT-15
2290872    1    43    4    55    Screen-Style-Color        05-OCT-15
2290872    1    43    5    56    Sill-Type        05-OCT-15
2290872    1    43    6    57    Sill-Color        05-OCT-15
2290872    1    43    7    58    Dimensions        05-OCT-15
2290872    1    43    8    59    Start-With        05-OCT-15
2290872    1    43    9    60    WIDTH        05-OCT-15
2290872    1    43    10    61    HEIGHT        05-OCT-15
2290872    2    28    1    29    Item        05-OCT-15
2290872    2    29    1    30    Cust-PO-Line-Number    2    05-OCT-15
2290872    2    29    6    31    Quantity    1    05-OCT-15
2290872    2    29    7    32    Part-Number    10501819    05-OCT-15
2290872    2    29    8    33    Revision-Level        05-OCT-15
2290872    2    29    9    34    Product-Name    CARTRIDGE, RH    05-OCT-15
2290872    2    29    10    35    Price    0    05-OCT-15
2290872    2    29    11    36    UOM    EA    05-OCT-15
2290872    2    29    12    37    Extended-Price    0    05-OCT-15
2290872    2    29    13    38    Supplier-Part        05-OCT-15
2290872    2    29    14    39    Item-Due-Date    12-OCT-15    05-OCT-15
2290872    2    29    16    40    BatchNo        05-OCT-15
2290872    2    29    17    41    SequenceNo        05-OCT-15
2290872    2    29    18    42    Release-HR        05-OCT-15
2290872    2    29    19    43    ItemDetail        05-OCT-15
2290872    2    29    2    47    Marvin-Sales-Order    A_E04704    05-OCT-15
2290872    2    29    3    48    Sales-Order-Line    2    05-OCT-15
2290872    2    29    15    49    DockID    -    05-OCT-15
2290872    2    29    4    50    Unit    A1    05-OCT-15
2290872    2    29    5    51    Sash    00    05-OCT-15
2290872    2    43    1    52    SCREENING        05-OCT-15
2290872    2    43    2    53    FINISH        05-OCT-15
2290872    2    43    3    54    Screen-Material        05-OCT-15
2290872    2    43    4    55    Screen-Style-Color        05-OCT-15
2290872    2    43    5    56    Sill-Type        05-OCT-15
2290872    2    43    6    57    Sill-Color        05-OCT-15
2290872    2    43    7    58    Dimensions        05-OCT-15
2290872    2    43    8    59    Start-With        05-OCT-15
2290872    2    43    9    60    WIDTH        05-OCT-15
2290872    2    43    10    61    HEIGHT        05-OCT-15
2290872    3    28    1    29    Item        05-OCT-15
2290872    3    29    1    30    Cust-PO-Line-Number    3    05-OCT-15
2290872    3    29    6    31    Quantity    1    05-OCT-15
2290872    3    29    7    32    Part-Number    10501819    05-OCT-15
2290872    3    29    8    33    Revision-Level        05-OCT-15
2290872    3    29    9    34    Product-Name    CARTRIDGE, RH    05-OCT-15
2290872    3    29    10    35    Price    0    05-OCT-15
2290872    3    29    11    36    UOM    EA    05-OCT-15
2290872    3    29    12    37    Extended-Price    0    05-OCT-15
2290872    3    29    13    38    Supplier-Part        05-OCT-15
2290872    3    29    14    39    Item-Due-Date    12-OCT-15    05-OCT-15
2290872    3    29    16    40    BatchNo        05-OCT-15
2290872    3    29    17    41    SequenceNo        05-OCT-15
2290872    3    29    18    42    Release-HR        05-OCT-15
2290872    3    29    19    43    ItemDetail        05-OCT-15
2290872    3    29    2    47    Marvin-Sales-Order    A_E04704    05-OCT-15
2290872    3    29    3    48    Sales-Order-Line    3    05-OCT-15
2290872    3    29    15    49    DockID    -    05-OCT-15
2290872    3    29    4    50    Unit    A1    05-OCT-15
2290872    3    29    5    51    Sash    00    05-OCT-15
2290872    3    43    1    52    SCREENING        05-OCT-15
2290872    3    43    2    53    FINISH        05-OCT-15
2290872    3    43    3    54    Screen-Material        05-OCT-15
2290872    3    43    4    55    Screen-Style-Color        05-OCT-15
2290872    3    43    5    56    Sill-Type        05-OCT-15
2290872    3    43    6    57    Sill-Color        05-OCT-15
2290872    3    43    7    58    Dimensions        05-OCT-15
2290872    3    43    8    59    Start-With        05-OCT-15
2290872    3    43    9    60    WIDTH        05-OCT-15
2290872    3    43    10    61    HEIGHT        05-OCT-15

Here is the output resulting from the use of the hierarchical line IN. query in the examples of code against the sample data:

<Record>
  <LineDetail>
    <Item>
      <Cust-PO-Line-Number>1</Cust-PO-Line-Number>
      <Marvin-Sales-Order>A_E04704</Marvin-Sales-Order>
      <Sales-Order-Line>1</Sales-Order-Line>
      <Unit>A1</Unit>
      <Sash>00</Sash>
      <Quantity>1</Quantity>
      <Part-Number>10501818</Part-Number>
      <Revision-Level/>
      <Product-Name>CARTRIDGE, LH</Product-Name>
      <Price>0</Price>
      <UOM>EA</UOM>
      <Extended-Price>0</Extended-Price>
      <Supplier-Part/>
      <Item-Due-Date>12-OCT-15</Item-Due-Date>
      <DockID>-</DockID>
      <BatchNo/>
      <SequenceNo/>
      <Release-HR/>
      <ItemDetail>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
      </ItemDetail>
      <Cust-PO-Line-Number>2</Cust-PO-Line-Number>
      <Marvin-Sales-Order>A_E04704</Marvin-Sales-Order>
      <Sales-Order-Line>2</Sales-Order-Line>
      <Unit>A1</Unit>
      <Sash>00</Sash>
      <Quantity>1</Quantity>
      <Part-Number>10501819</Part-Number>
      <Revision-Level/>
      <Product-Name>CARTRIDGE, RH</Product-Name>
      <Price>0</Price>
      <UOM>EA</UOM>
      <Extended-Price>0</Extended-Price>
      <Supplier-Part/>
      <Item-Due-Date>12-OCT-15</Item-Due-Date>
      <DockID>-</DockID>
      <BatchNo/>
      <SequenceNo/>
      <Release-HR/>
      <ItemDetail>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
      </ItemDetail>
      <Cust-PO-Line-Number>3</Cust-PO-Line-Number>
      <Marvin-Sales-Order>A_E04704</Marvin-Sales-Order>
      <Sales-Order-Line>3</Sales-Order-Line>
      <Unit>A1</Unit>
      <Sash>00</Sash>
      <Quantity>1</Quantity>
      <Part-Number>10501819</Part-Number>
      <Revision-Level/>
      <Product-Name>CARTRIDGE, RH</Product-Name>
      <Price>0</Price>
      <UOM>EA</UOM>
      <Extended-Price>0</Extended-Price>
      <Supplier-Part/>
      <Item-Due-Date>12-OCT-15</Item-Due-Date>
      <DockID>-</DockID>
      <BatchNo/>
      <SequenceNo/>
      <Release-HR/>
      <ItemDetail>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
      </ItemDetail>
    </Item>
    <Item>
      <Cust-PO-Line-Number>1</Cust-PO-Line-Number>
      <Marvin-Sales-Order>A_E04704</Marvin-Sales-Order>
      <Sales-Order-Line>1</Sales-Order-Line>
      <Unit>A1</Unit>
      <Sash>00</Sash>
      <Quantity>1</Quantity>
      <Part-Number>10501818</Part-Number>
      <Revision-Level/>
      <Product-Name>CARTRIDGE, LH</Product-Name>
      <Price>0</Price>
      <UOM>EA</UOM>
      <Extended-Price>0</Extended-Price>
      <Supplier-Part/>
      <Item-Due-Date>12-OCT-15</Item-Due-Date>
      <DockID>-</DockID>
      <BatchNo/>
      <SequenceNo/>
      <Release-HR/>
      <ItemDetail>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
      </ItemDetail>
      <Cust-PO-Line-Number>2</Cust-PO-Line-Number>
      <Marvin-Sales-Order>A_E04704</Marvin-Sales-Order>
      <Sales-Order-Line>2</Sales-Order-Line>
      <Unit>A1</Unit>
      <Sash>00</Sash>
      <Quantity>1</Quantity>
      <Part-Number>10501819</Part-Number>
      <Revision-Level/>
      <Product-Name>CARTRIDGE, RH</Product-Name>
      <Price>0</Price>
      <UOM>EA</UOM>
      <Extended-Price>0</Extended-Price>
      <Supplier-Part/>
      <Item-Due-Date>12-OCT-15</Item-Due-Date>
      <DockID>-</DockID>
      <BatchNo/>
      <SequenceNo/>
      <Release-HR/>
      <ItemDetail>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
      </ItemDetail>
      <Cust-PO-Line-Number>3</Cust-PO-Line-Number>
      <Marvin-Sales-Order>A_E04704</Marvin-Sales-Order>
      <Sales-Order-Line>3</Sales-Order-Line>
      <Unit>A1</Unit>
      <Sash>00</Sash>
      <Quantity>1</Quantity>
      <Part-Number>10501819</Part-Number>
      <Revision-Level/>
      <Product-Name>CARTRIDGE, RH</Product-Name>
      <Price>0</Price>
      <UOM>EA</UOM>
      <Extended-Price>0</Extended-Price>
      <Supplier-Part/>
      <Item-Due-Date>12-OCT-15</Item-Due-Date>
      <DockID>-</DockID>
      <BatchNo/>
      <SequenceNo/>
      <Release-HR/>
      <ItemDetail>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
      </ItemDetail>
    </Item>
    <Item>
      <Cust-PO-Line-Number>1</Cust-PO-Line-Number>
      <Marvin-Sales-Order>A_E04704</Marvin-Sales-Order>
      <Sales-Order-Line>1</Sales-Order-Line>
      <Unit>A1</Unit>
      <Sash>00</Sash>
      <Quantity>1</Quantity>
      <Part-Number>10501818</Part-Number>
      <Revision-Level/>
      <Product-Name>CARTRIDGE, LH</Product-Name>
      <Price>0</Price>
      <UOM>EA</UOM>
      <Extended-Price>0</Extended-Price>
      <Supplier-Part/>
      <Item-Due-Date>12-OCT-15</Item-Due-Date>
      <DockID>-</DockID>
      <BatchNo/>
      <SequenceNo/>
      <Release-HR/>
      <ItemDetail>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
      </ItemDetail>
      <Cust-PO-Line-Number>2</Cust-PO-Line-Number>
      <Marvin-Sales-Order>A_E04704</Marvin-Sales-Order>
      <Sales-Order-Line>2</Sales-Order-Line>
      <Unit>A1</Unit>
      <Sash>00</Sash>
      <Quantity>1</Quantity>
      <Part-Number>10501819</Part-Number>
      <Revision-Level/>
      <Product-Name>CARTRIDGE, RH</Product-Name>
      <Price>0</Price>
      <UOM>EA</UOM>
      <Extended-Price>0</Extended-Price>
      <Supplier-Part/>
      <Item-Due-Date>12-OCT-15</Item-Due-Date>
      <DockID>-</DockID>
      <BatchNo/>
      <SequenceNo/>
      <Release-HR/>
      <ItemDetail>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
      </ItemDetail>
      <Cust-PO-Line-Number>3</Cust-PO-Line-Number>
      <Marvin-Sales-Order>A_E04704</Marvin-Sales-Order>
      <Sales-Order-Line>3</Sales-Order-Line>
      <Unit>A1</Unit>
      <Sash>00</Sash>
      <Quantity>1</Quantity>
      <Part-Number>10501819</Part-Number>
      <Revision-Level/>
      <Product-Name>CARTRIDGE, RH</Product-Name>
      <Price>0</Price>
      <UOM>EA</UOM>
      <Extended-Price>0</Extended-Price>
      <Supplier-Part/>
      <Item-Due-Date>12-OCT-15</Item-Due-Date>
      <DockID>-</DockID>
      <BatchNo/>
      <SequenceNo/>
      <Release-HR/>
      <ItemDetail>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
        <SCREENING/>
        <FINISH/>
        <Screen-Material/>
        <Screen-Style-Color/>
        <Sill-Type/>
        <Sill-Color/>
        <Dimensions/>
        <Start-With/>
        <WIDTH/>
        <HEIGHT/>
      </ItemDetail>
    </Item>
  </LineDetail>
</Record>

Thanks in advance for any help.

Paul

I might have misunderstood your data, but think that the problem is in your code of treewalk.  I think that a party must be:

SELECT

LEVEL LVL,

Y.XPL_TAGNAME MWELEMENT,

Y.XPL_TAGVALUE TAGVAL,

Y.XPL_TAGSEQ TAGSEQ,

Y.XPL_SUBSEQ FOLLOWING,

Y.XPL_GRPSEQ GRPSEQ,

Y.XPL_POLINE KAMILLA

OF XMLPOLINETEST Y

START WITH Y.XPL_PONO =: PONO

AND Y.XPL_POLINE = 0

AND Y.XPL_TAGNAME = 'LineDetail.

CONNECT PRIOR Y.XPL_PONO = Y.XPL_PONO

AND PRIOR Y.XPL_POLINE (0, Y.XPL_POLINE)

AND PRIOR Y.XPL_GRPSEQ = Y.XPL_SUBSEQ

BROTHERS AND SŒURS ORDER BY Y.XPL_POLINE

Y.XPL_SUBSEQ

Y.XPL_TAGSEQ

EDIT: adding Y.XPL_PONO PRIOR = Y.XPL_PONO for the use of the index.

Tags: Database

Similar Questions

  • Bug? Photo ring String property and values' returns the error 1054 in LV 8.5

    This property must exist for a ring photo?

    Ben

    James W wrote:

    I take it from what I read here that there as no way to programmatically update the values of a ring of photo running then?

    ...

    You are right that a RING of photo may not be populated at run time. On the other hand an image can be updated.

    This thread has many links to examples of photo.

    These tags can also help start with the photo of LV.

    Have fun!

    Ben

  • In what order are anchor command left and right control point values returned by entirePath()?

    The entirePath() returns the anchor points that have two values, or it returns an array with three coordinates. I would like to know, in this case, what is the point of anchorage, control point index and values of point of order from right to left?

    The three values are leftDirection, the point of anchorage and directed. 'leftDirection' and 'directed' compete in the competition for the worst property names, because they have nothing to do with the left and right. Publishers of fonts and other programs that deal with the use of the perfectly transparent Bezier curves "in" and "out." These words make sense. Adobe of not.

    To find out what values stand for, draw a simple curve with three points, then use a script to write the values to the console of the ESTK. Open the transform Panel and check the values it that that you printed in the console.

    A major problem in all of this, is that when you select a point with the direct Selection tool, app.selection [0] does not return this point (I forget now what it returns) and get a handle on a selected point is an ugly hack.

    Peter

  • possible to have a display value and the return of LOV

    Hello

    With the help of obiee 11g, I have a variable prompt that takes column as value.
    I have the report that I use a diff column eual to this prompt value.
    I wanted to know if its possible at all to have a view and a return value
    i.e. in the lov, we show a value and when we choose we choose a different value that goes to the filter

    For example. If we have an APAC region in the table, and then in the show LOV in Asia-Pacific and it returns APAC, so that
    in the data filter gets filtered using ICCA.

    Thank you

    You can try something like this sql in the Prompt Variable:
    SELECT CASE WHEN Office.Region = "ACPA" THEN 'Asia-Pacific' WHERE Office.Region = END 'EMEA' THEN 'EUROPE' TO THE "subject domain name.

    And then in the report so you need to change the column fx filter
    CASE WHEN Office.Region = "ACPA" THEN 'Asia-Pacific' WHERE Office.Region = END 'EMEA' THEN 'EUROPE '.

    Note: This is very good for the case where you have less no.. of LOVs in the column.

    Hope it will be useful...

  • I am facing a problem with the beep.vi. I have a DAQ program, which acquired the signal and compare it to a threshold value. When a signal is out of range, a Visual and sound alarm has occurred. I use the VI beep.vi to generate the sound.

    I am facing a problem with the beep.vi.  I have a DAQ program, which acquired the signal and compare it to a threshold value. When a signal is out of range, a Visual and sound alarm has occurred. I use the VI beep.vi to generate the sound. Everything works fine except the sound alarm. It gives the table 1 d of type mismatch. I tried to fix this by placing it in a box structure. But it still does not work. If someone could help? Please find attached my VI. Best wishes to all visitors to the Forums of Discussion OR.

    Ihab El-Sayed

    published here: http://forums.ni.com/t5/LabVIEW/Playing-sound-based-on-exceeding-a-threshold-value-1D-array-data/m-p...

  • I got lightroom 6 is installed on my laptop. He beat and went to repair. When it is returned when I tried to use lightroom, it said that I had already installed on two computers. I have uninstall lightroom 6 on my laptop, but when I reinstalled the messag

    I got lightroom 6 is installed on my laptop. He beat and went to repair. When it is returned when I tried to use lightroom, it said that I had already installed on two computers. I have uninstall lightroom 6 on my laptop but when I reinstalled the message that I have two computers is still there. I need help. I don't understand what is happening because it's the same laptop that I installed in the first place. Help, please.

    If she had a major equipment change (as a replacement of hd), it resembles another computer.

    Contact adobe during the time pst support by clicking here and, when available, click on "still need help", https://helpx.adobe.com/contact.html , and request activation reset account.

  • When I use the truncation tool, select a zone and press return it removes everything except for a single pixel. This just started today. CS5, Windows 7.

    When I use the truncation tool, select a zone and press return it removes everything except for a single pixel. This just started today. CS5, Windows 7. I tried to reinstall CS5 and who did not help. I am trying to set up a new computer and installed Photo Shop CS5 on it earlier in the day. Maybe it has something to do with it. But until I get the new fully configured machine I still want to continue to work on my current machine, which is where the problem is happening.

    Hi haroldschlegel,

    Please try resetting the cropping tool

    Restart Photoshop once done and see if that helps.

    Kind regards

    Assani

  • LOV query is not valid, a display and a return value is necessary, column n

    Hello

    I AM FACING
    LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, 
    the first FROM clause in the SQL statement must not belong to the in-line query.
    with two table, I create lov

    the tables are
    CREATE TABLE  "CRM_SALES_DEPARTMENT" 
       (     "DEPT_ID" NUMBER NOT NULL ENABLE, 
         "CUSTOMER_ID" NUMBER NOT NULL ENABLE, 
         "DEPT_CODE" VARCHAR2(50) NOT NULL ENABLE, 
          CONSTRAINT "CRM_SALES_DEPARTMENT_PK" PRIMARY KEY ("DEPT_ID") ENABLE
       )
    CREATE TABLE  "CRM_SALES_CUSTOMERS" 
       (     "ID" NUMBER, 
         "CUSTOMER_NAME" VARCHAR2(255), 
         "CUSTOMER_ADDRESS1" VARCHAR2(255), 
          PRIMARY KEY ("ID") ENABLE
       )
    I USE QUARY
    select (SELECT CS.CUSTOMER_NAME FROM CRM_SALES_CUSTOMERS CS WHERE CS.ID=SD.CUSTOMER_ID) AD D, SD.CUSTOMER_ID R  
    from CRM_SALES_DEPARTMENT SD where SD.DEPT_CODE=:P16_MARKET 
    But who show me LOV query is not valid, a display and a return value is needed, the column names must be
    different. If your query contains a query online, the first CLAUSE in the SQL statement must not belong to the query online.

    How to solve this problem.

    Thank you

    Published by: 805629 on January 10, 2011 03:46

    Published by: 805629 on January 10, 2011 03:58

    Published by: 805629 on January 10, 2011 03:59

    ¿AD?
    Select (SELECTION of CS. CLIENT_NAME CS CRM_SALES_CUSTOMERS WHERE CS.ID = SD. CUSTOMER_ID) AD D, SD. CUSTOMER_ID R
    CRM_SALES_DEPARTMENT SD where SD DEPT_CODE =: P16_MARKET

    But the correct way is a join outher

    select CS.CUSTOMER_NAME D, SD.CUSTOMER_ID R
    from CRM_SALES_CUSTOMERS CS,
            CRM_SALES_DEPARTMENT SD
    where SD.DEPT_CODE=:P16_MARKET
    And CS.ID(+)=SD.CUSTOMER_ID
    
  • When I send an e-mail to MS Outlook Express sends it leaves the Outbox and guard return the same email over and over again (unless I'm deleting it).

    In other words, the e-mail message remains in the Outbox and is NOT in the SENT ITEMS folder.

    You have apparent dbx file corruption.

    Spend most of your messages out of the Inbox and then create new folders to send and sent items box after having moved the messages you want to save to a local folder that you create.

    Tools | Options | Maintenance | Store folder will reveal the location of your Outlook Express files. Note the location and navigate on it in Explorer Windows or, copy and paste in start | Run.

    In Windows XP, Win2K & Win2K3 the OE user files (DBX and WAB) are by default marked as hidden. To view these files in Windows Explorer, you must enable Show hidden files and folders under start | Control Panel | Folder Options icon | Opinion, or in Windows Explorer. Tools | Folder options | View.

    With OE closed, find the DBX files for the items in the Outbox and sent and delete them.  New ones will be created automatically when you open OE.

    After you're done, followed by compacting your folders manually while working * off * and do it often.

    Click Outlook Express at the top of the the folder tree so no folders are open. Then: File | Work offline (or double-click on work online in the status bar). File | Folder | Compact all folders. Don't touch anything until the compacting is completed.

    General precautions for Outlook Express:

    Do not archive mail in the receipt or sent items box. Create your own user-defined folders and move messages you want to put in them. Empty the deleted items folder daily. Although the dbx files have a theoretical capacity of 2 GB, I recommend all a 300 MB max for less risk of corruption.

    Information on the maximum size of the .dbx files that are used by Outlook Express:
    http://support.Microsoft.com/?kbid=903095

    Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the CPUs, slows down sending and receiving and causes a multitude of problems such as time-outs, account setting changes and has even been responsible for the loss of messages. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
    http://www.oehelp.com/OETips.aspx#3

    Why you don't need your anti-virus to scan your email
    http://thundercloud.NET/infoave/tutorials/email-scanning/index.htm

    Note that for some AV programs, it may be necessary to uninstall the program and reinstall in custom Mode and uncheck analysis when the option is the result of e-mail messages.

    Compact often as specified above.

    And backup often.

    Outlook Express Quick Backup (OEQB Freeware)
    http://www.oehelp.com/OEBackup/default.aspx

    Bruce Hagen
    MS - MVP October 1, 2004 ~ September 30, 2010
    Imperial Beach, CA

  • my computer recently crashed and when I tried to use photoshop, then I got the message: - message - problem with display driver, temporarily disabled the improvements. Does that mean, they will return when the problem is solved?

    My computer recently crashed. A fixed it but! When I then tried to use photoshop I got the message: - message - problem with display driver, temporarily disabled the improvements. Does that mean, they will return when the problem is solved?

    Update or restore your graphics driver.

  • My EO fields are numeric values, but when I create the EOIMPL class they are converted to INTEGERS numbers. Why, please explain.

    Mr President

    My EO fields are numeric values, but when I create the EOIMPL class they are converted to INTEGERS numbers. Why, please explain.

        public static final int PURQTY = AttributesEnum.Purqty.index();
        public static final int STAXRATE = AttributesEnum.Staxrate.index();
        public static final int UNITPURPRICE = AttributesEnum.Unitpurprice.index();
        public static final int SALQTY = AttributesEnum.Salqty.index();
        public static final int UNITSALPRICE = AttributesEnum.Unitsalprice.index();
        public static final int PARTICULARS = AttributesEnum.Particulars.index();
        public static final int AMOUNT = AttributesEnum.Amount.index();
    

    Can keep us in digital format.

    Concerning

    No.... These int values not the type of display object attributes. These integers is the index of attributes.

    To determine the type of the VO attributtes, you should see the Get accessor of the attribute and the setter

    as

      /**
       * Gets the attribute value for the calculated attribute CountDockets.
       * @return the CountDockets
       */
      public BigDecimal getCountDockets()
      {
        return (BigDecimal) getAttributeInternal(COUNTDOCKETS);
      }
    
      /**
       * Sets value as the attribute value for the calculated attribute CountDockets.
       * @param value value to set the  CountDockets
       */
      public void setCountDockets(BigDecimal value)
      {
        setAttributeInternal(COUNTDOCKETS, value);
      }
    

    This means that the attribute type CountDockets BigDecimal

  • How to get 'Print', 'Download' and 'Back' link when navigate using go the URL

    I have a report R2, there a chart based on PivotTable. This report is called from another report R1 using the feature to the URL. Report R2 does not 'Print', 'Download' and 'back' link when it is called R1. But if I run R2 as it shows the report asandalone 'Print' and 'Download' links.

    can you pls suggest how I can get 'Print', 'Download' and 'back' links when R2 is called from R1 using the feature to the URL.

    You will usually use GO Url to integrate with external portal, so there is no value 'return' for the parameter 'Options '.

    The possible values for the link Options are:
    m change request
    f print version
    d - download to Excel
    r - refresh results

    If you need to view back, you can add another parameter called Done like below and provide the explicit path to where you want to go. For example, in the example below, I would go back to answers to myreport

    http://prakashj:7777/Analytics/saw.dll?go&path=/users/administrator/myreport2&options=rmfd&done=answers%26path=/users/administrator/MyReport

    HTH,
    Prakash

    Published by: prakah on August 17, 2009 08:51

    Published by: prakah on August 17, 2009 09:03

  • Firefox is constantly stopping, aging, and does not when on the home page yahoo uk, Manager of the tasks is that means to stop it, no event will block

    Latest version of Firefox, keep up to date. 8.1 Windows running on del optiplex 620, 2 GB of ram, 80 GB disk partitioned with Win10 on the other. Panda free av and malwarebytes free running. Never had any problem with Win 8.1 up to now, I have returned to it because of many problems with Win 10. Did you check Event Viewer, nothing, checked for crash report, nothing. No malware not reported. Whenever the only solution is to stop Fox with the Manager of the tasks and then restart when Fox goes back to where she was.

    https://UK.Yahoo.com/ I noticed no problem in the last two sessions, perhaps the problem is resolved, will not display rear reccurrence as appropriate.

  • I would like to summarize the values returned by a formula similar to the 'search', but for ranges or entire columns

    Thus,.

    I have three values in column K - 'A', 'B', 'C '. Column I is numeric values.

    I am trying to create a formula that selects all rows in the K column with a specfic value (in this case 'A' 'B' or 'C'), then grab the corresponding value (on the same line) of column I, then add up all the results for a total.

    IF rows in column K returns 'A', THEN take the VALUE of corresponding column I, and THEN SUM all the values returned.

    Or something like that.

    You can try something like this:

    The formula in B2, filled to the bottom, is:

    SUMIF (table 1::K, A2, table 1::L)

    SG

  • I can't get the tabs of the previous session of the return when I reopen it Firefox. The header of the window, or 'Quit' in the file Menu using 'Close' of Firefox not working. Note that "Restoration of previous Session" on my Menu history is grayed out so

    Question
    I can't get the tabs of the previous session of the return when I reopen it Firefox. I tried closing with 'Close' header of Firefox window, but also 'Quit' in the file Menu. Note that "Restoration of previous Session" on my Menu history is grayed out so I can't use it. In addition, there is no tab at the top of my window to open Firefox Firefox - only a menu bar that shows "File", "Edit", "View", "History", "Favorites", "Tools" and "Help". I am running Windows 7 Home Professional and Firefox 4.01

    "I can't do the tabs from the previous session of the return when I reopen it Firefox.

    Remember that you are not private browsing or they are in permanent private browsing mode. See: https://support.mozilla.com/en-US/kb/Private%20Browsing (2nd and 3rd options menu on this page)

    Make sure that you are not clearing history during a session or when Firefox is closed. See:

    • Clear recent history: https://support.mozilla.com/en-US/kb/Clear%20Recent%20History
    • Clear history of Firefox closing: uncheck 'Clear history of Firefox closing' options > Privacy panel (the first item under "History" on this Panel should be set on "Firefox will be: use the custom settings for history" to see that point to uncheck)

    "There is no Firefox tab at the top of my Firefox window open - only a menu bar.

    The Firefox button is supposed to be on by default in Vista and Windows 7.

    In Firefox 4, you have the choice of using the Firefox (orange or grey) button in the upper left or the menu bar (File, Edit, View, history, Favorites, tools.) Help).

    • The selections on the Firefox button are distinguished by the menu bar options.
    • You can easily switch between the Menu bar and the Firefox button or leave one or the other active.
    • One used depends on if the Menu bar is enabled
      • Bar menu checked = Bar Menu on, Firefox off button
      • Bar menu unchecked = Menu Bar off, Firefox button on

    When the Firefox button appears and you want to temporarily view and use the menu bar, press ALT or F10 displays the menu bar and you can make your selections in the Menu bar displayed temporarily.

    To check (or uncheck) the menu bar, do one of the following:

    • using the Firefox button: click on the Firefox button > Options > Menu bar
    • using the Menu bar: click on view > toolbars > Menu bar
    • Hold DOWN the ALT key while pressing the VTM keyboard letters

Maybe you are looking for

  • My iMac developed the yellow spots and stripes, froze and won't restart

    During use, my iMac has shown the yellow spots which then turned into 5 vertical stripes. I turn it off, waited, then tried to charge - unsuccessfully so I turned off again and zap the PRAM. but as it tries to open it, the small bar under the Apple i

  • SD card reader does not work

    1 hp Pavilion Dv7-7002el 2. Windows 7 64 bit SD card reader does not work Thank you

  • iPhone ring is not on some calls

    Ringer is on. My wife can call me and the call comes loud and clear, but many other calls doesn't ring or vibrate. I checked, double checked and triple checked the settings, but what happens on calls more. Help?

  • First installation

    Hi all Just had a NMH300 and I am trying to install the HARD drive (nine 1.5 to Seagate). Someone at - it an idea of how long will take the original format? Happened now for about 9 hours, blue power LED flashing about 4 times per second. Just after

  • Ask about webvpn error recovery

    Hi experts I have a query when webvpn error recovery is enabled, it won't save much in the ordinary crashinfo; However when it is disabled, it defintely records many details in the crashinfo .is this crashinfo for webvpn separately from the usual cra