• Thanks guys,

    Thanks for taking the time to review my request. Sorry for not displaying more descriptive data. Below is the modified data that i used to produce the table (select into). This is essentially an xml file that I extracted from drive mapping in the Group Policy Preference section. As you can see, There is some uncertainty found within the <Filters> </Filters> section which makes my task more difficult.

    ----------------------------------------------------------------------------------------------------------

    declare @Doc XML

    declare @order int

    SET @Doc = cast('

    <Drives clsid="{8FDDCC1A-0C3C-43cd-A6B4-71A6DF20DA8C}">

    <Drive clsid="{935D1B74-9CB8-4e3c-9914-7DD559B7A417}" name="B:" status="B:" image="2" changed="2011-07-29 19:47:03" uid="{6620ED0E-FBB0-49B6-8F36-89C8ADE22620}" desc="This is description" bypassErrors="1">

    <Properties action="U" thisDrive="SHOW" allDrives="NOCHANGE" userName="" path="\\USFILESERVER\temp\Tommy" label="Archive" persistent="0" useLetter="1" letter="B"/>

    <Filters>

    <FilterUser bool="AND" not="0" name="Company\TBill" sid="S-1-5-21-53361137-2144680551-1845911597-28442"/>

    </Filters>

    </Drive>

    <Drive clsid="{935D1B74-9CB8-4e3c-9914-7DD559B7A417}" name="B:" status="B:" image="2" changed="2011-03-23 16:49:00" uid="{94FD6371-5FF0-4F8D-896A-5F91FDF25E88}" desc="This is a description" bypassErrors="1">

    <Properties action="U" thisDrive="SHOW" allDrives="NOCHANGE" userName="" path="\\USFILESERVER1\temp\Sounza" label="Archive" persistent="0" useLetter="1" letter="B"/>

    <Filters>

    <FilterUser bool="AND" not="0" name="Company\Sounza" sid="S-1-5-21-53361137-2144680551-1845911597-24196"/>

    <FilterUser bool="OR" not="0" name="Company\Silva" sid="S-1-5-21-53361137-2144680551-1845911597-24201"/>

    </Filters>

    </Drive>

    <Drive clsid="{935D1B74-9CB8-4e3c-9914-7DD559B7A417}" name="F:" status="F:" image="2" changed="2011-03-01 15:35:43" uid="{3929C79C-6ACD-4D9E-A125-0C5EF62CF69D}" desc="Fake Reports" bypassErrors="1">

    <Properties action="U" thisDrive="NOCHANGE" allDrives="NOCHANGE" userName="" path="\\USFILESERVER1\temp\Accounting" label="FakeReports" persistent="0" useLetter="1" letter="F"/>

    <Filters>

    <FilterCollection bool="AND" not="0">

    <FilterGroup bool="AND" not="0" name="Company\Accounting" sid="S-1-5-21-53361137-2144680551-1845911597-18728" userContext="1" primaryGroup="0" localGroup="0"/>

    <FilterGroup bool="OR" not="0" name="Company\Dept_US_Accounting_Systems" sid="S-1-5-21-53361137-2144680551-1845911597-23834" userContext="1" primaryGroup="0" localGroup="0"/>

    </FilterCollection>

    <FilterCollection bool="OR" not="0">

    <FilterGroup bool="AND" not="0" name="Company\Accounting_General" sid="S-1-5-21-53361137-2144680551-1845911597-23654" userContext="1" primaryGroup="0" localGroup="0"/>

    <FilterGroup bool="OR" not="0" name="Company\Accounting_Systems_DEPT" sid="S-1-5-21-53361137-2144680551-1845911597-23656" userContext="1" primaryGroup="0" localGroup="0"/>

    </FilterCollection>

    </Filters>

    </Drive>

    <Drive clsid="{935D1B74-9CB8-4e3c-9914-7DD559B7A417}" name="W:" status="W:" image="2" changed="2012-10-11 23:26:09" uid="{929701C3-2A79-40CA-8E62-DB4DEAAB1758}" disabled="1" desc="Drive mapping for Cerico test server" bypassErrors="1">

    <Properties action="U" thisDrive="NOCHANGE" allDrives="NOCHANGE" userName="" path="\\USCERICO\hr" label="CeridianTST" persistent="0" useLetter="1" letter="W"/>

    <Filters>

    <FilterCollection bool="AND" not="0">

    <FilterGroup bool="AND" not="0" name="Company\Cerico" sid="S-1-5-21-53361137-2144680551-1845911597-15423" userContext="1" primaryGroup="0" localGroup="0"/>

    </FilterCollection>

    <FilterCollection bool="AND" not="0">

    <FilterComputer bool="OR" not="0" type="NETBIOS" name="USSERVER10"/>

    </FilterCollection>

    </Filters>

    </Drive>

    <Drive clsid="{935D1B74-9CB8-4e3c-9914-7DD559B7A417}" name="F:" status="F:" image="2" changed="2012-10-29 15:07:17" uid="{3F9E8CF4-41F1-4196-9959-7E6FA0543F19}" disabled="0" desc="Drive mapp for Data room. Per management request. " bypassErrors="1">

    <Properties action="U" thisDrive="SHOW" allDrives="NOCHANGE" userName="" path="\\EUFLANDE01\FLANDETUY" label="Archive" persistent="0" useLetter="1" letter="F"/>

    <Filters>

    <FilterUser bool="AND" not="0" name="Company\cohens" sid="S-1-5-21-53361137-2144680551-1845911597-31844"/>

    <FilterUser bool="OR" not="0" name="Company\Landigo" sid="S-1-5-21-53361137-2144680551-1845911597-38278"/>

    <FilterUser bool="OR" not="0" name="Company\Raradibe" sid="S-1-5-21-53361137-2144680551-1845911597-38279"/>

    <FilterUser bool="OR" not="0" name="Company\Wocerihe" sid="S-1-5-21-53361137-2144680551-1845911597-24156"/>

    </Filters>

    </Drive>

    </Drives>' as XML)

    select y.[desc].value('@letter','varchar (230)') as letter

    ,x.[desc].value('@desc[1]','varchar (230)') as [desc]

    ,y.[desc].value('@path','varchar (230)') as [path]

    ,y.[desc].value('@label','varchar (230)') as Label

    ,x.[desc].value('@changed','varchar (230)') as [Last Changed]

    ,z.[desc].value('@bool','varchar(10)') as condition

    ,z.[desc].value('@name','varchar(1000)') as Username

    from @doc.nodes('/Drives/Drive') x ([desc])

    outer

    apply x.[desc].nodes('Properties') y ([desc])

    outer

    apply x.[desc].nodes('Filters/FilterUser') z ([desc])

    ------------------------------------------------------------------------------------------------------------------------------