Home Forums Programming XML Nesting SQL to XML Grouping issue RE: Nesting SQL to XML Grouping issue

  • Hi, thanks for the reply. I need the output to be like below:-

    <Accts>

    <Acct>94615130</Acct>

    <Items>

    <ITEM>1001</ITEM>

    </Items>

    <Items>

    <ITEM>1050</ITEM>

    </Items>

    <Items>

    <ITEM>1051</ITEM>

    </Items>

    <Items>

    <ITEM>1054</ITEM>

    </Items>

    <Items>

    <ITEM>1055</ITEM>

    </Items>

    ....

    </Accts>

    But I need the where clause in the sub query to be like Item1.Code = Item.code AND Item1.ItemNo = Item.ItemNo as doing it on Code or account number alone is not unique enough as this will be applied to a much larger query where there will be many different unique items linked to a account or code number.