Flatten Ragged Hierarchy Table

  • Hi All,

    I have a ragged hierarchy table I need to flatten. So not every level have a child or parent (though my example does) and it needs to shows lowest level non null value. I have tried staging the different rows in separate tables using left joins but its' not correct.

    Current

    current hier

    Desired

     

    hier 2

    CREATE TABLE [dbo].[Hier_table](
    [Dimensions] [varchar](50) NULL,
    [Management] [varchar](50) NULL,
    [Description] [varchar](100) NULL,
    [Level] [varchar](50) NULL
    );


    INSERT INTO [dbo].[Hier_table]
    ([Dimensions]
    ,[Management]
    ,[Description]
    ,[Level])
    VALUES('OBU1','GPFX','Description Level 2','2'),
    ('GPFX','GPS1','Description Level 3','3'),
    ('GPS1','3202_INCL_Corp_Exec','Description Level 4','4'),
    ('GPS1','3202_EXCL_Corp_Exec','Description Level 4','4'),
    ('3202_EXCL_Corp_Exec','3202_HO2','Description Level 5','5'),
    ('3202_EXCL_Corp_Exec','3202_CF','Description Level 5','5'),
    ('3202_EXCL_Corp_Exec','3202_INV', 'Description Level 5','5'),
    ('3202_EXCL_Corp_Exec','3202_PROJECTS','Description Level 5','5'),
    ('3202_EXCL_Corp_Exec','3202_GIT','Description Level 5','5'),
    ('3202_EXCL_Corp_Exec','3202G','Description Level 5','5'),
    ('3202G','M1OAZZ','Description Level 6','6'),
    ('3202_GIT','M1OAXX','Description Level 6','6'),
    ('3202_GIT','M1OABH','Description Level 6','6'),
    ('M1OAZZ','3202.9071.101001','Description Level 7','7'),
    ('M1OAZZ','3202.2000.100750','Description Level 7','7'),
    ('M1OAXX','3202.9058.100294','Description Level 7','7'),
    ('M1OABH','3202.9058.100294','Description Level 7','7');

    Thanks for any assistance

    • This topic was modified 4 years, 10 months ago by  ringovski.
  • You need a recursive query.  Have a look at this, and post back if there's anything in particular you don't understand.

    John

  • I came up with the following self referencing CTE but its not moving along the levels, so IDK.

    With CTE
    AS(
    SELECT Dimensions,Management,[Description], [Level]
    FROM [dbo].[Hier_table]
    WHERE Dimensions = 'OBU1'
    UNION ALL
    SELECT e.Dimensions, e.Management, e.[Description], c.[Level]+1
    FROM CTE AS C
    JOIN [dbo].[Hier_table] AS e
    ON e.management = c.dimensions
    WHERE C.[LEVEL] < 8
    )
    SELECT *
    FROM CTE

     

     

  • ringovski wrote:

    I came up with the following self referencing CTE but its not moving along the levels, so IDK.

    With CTE
    AS(
    SELECT Dimensions,Management,[Description], [Level]
    FROM [dbo].[Hier_table]
    WHERE Dimensions = 'OBU1'
    UNION ALL
    SELECT e.Dimensions, e.Management, e.[Description], c.[Level]+1
    FROM CTE AS C
    JOIN [dbo].[Hier_table] AS e
    ON e.management = c.dimensions
    WHERE C.[LEVEL] < 8
    )
    SELECT *
    FROM CTE

    You are not getting rows back because your data doesn't have any rows where e.management = 'OBU1'. So you are only getting the 1 row WHERE Dimensions = 'OBU1'.

    Can also you specify the output you are expecting from the data you have provided?

  • Not really clear what you're after but see if this helps. Obviously this is for a fixed number of levels only, a variable number of levels will need dynamic SQL.

    WITH Recur AS (
    SELECT h.Management AS LeafNode,h.Description AS LeafNodeDescription,h.Dimensions,h.Management,h.Description,h.Level
    FROM dbo.Hier_table h
    WHERE NOT EXISTS(SELECT * FROM dbo.Hier_table h2 WHERE h2.Dimensions = h.Management) -- leaf nodes only

    UNION ALL

    SELECT r.LeafNode,r.LeafNodeDescription,h.Dimensions,h.Management,h.Description,h.Level
    FROM Recur r
    INNER JOIN dbo.Hier_table h ON h.Management = r.Dimensions
    )
    SELECT LeafNodeDescription,
    MAX(CASE WHEN Level = 2 THEN Management END) AS [Level 2 Dimensions],
    MAX(CASE WHEN Level = 3 THEN Management END) AS [Level 3 Dimensions],
    MAX(CASE WHEN Level = 4 THEN Management END) AS [Level 4 Dimensions],
    MAX(CASE WHEN Level = 5 THEN Management END) AS [Level 5 Dimensions],
    MAX(CASE WHEN Level = 6 THEN Management END) AS [Level 6 Dimensions],
    MAX(CASE WHEN Level = 7 THEN Management END) AS [Level 7 Dimensions]
    FROM Recur
    GROUP BY LeafNode,LeafNodeDescription
    ORDER BY LeafNode,LeafNodeDescription;

    • This reply was modified 4 years, 10 months ago by  Mark Cowne.

    ____________________________________________________

    Deja View - The strange feeling that somewhere, sometime you've optimised this query before

    How to get the best help on a forum

    http://www.sqlservercentral.com/articles/Best+Practices/61537
  • I have attached a small sample expected output as CSV and a screen shot. Level 2 & 3 are only one row but the other rows can be one or more rows within that level hence 5-6 & 5-7. Hope this helps.

    ragged

    • This reply was modified 4 years, 10 months ago by  ringovski.
    Attachments:
    You must be logged in to view attached files.
  • ringovski wrote:

    I have attached a small sample expected output as CSV and a screen shot. Level 2 & 3 are only one row but the other rows can be one or more rows within that level hence 5-6 & 5-6. Hope this helps.

    ragged

    This data doesn't match up with you original post.

    For example, 3202.2000.100642 doesn't exist in your original post.


  • INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'OBU1', N'GPFX', N'XXX Elephant Total', 2)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'GPFX', N'GPS1', N'XXX XXX Fire Total', 3)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'GPS1', N'3202_INCL_Corp_Exec', N'XXX Functions (XXX Executive and House Development)', 4)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'GPS1', N'3202_EXCL_Corp_Exec', N'XXX Functions (excl XXX Executive and House Development)', 4)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_EXCL_Corp_Exec', N'3202_BB2', N'Head Office Functions (excl XXX Executive and House Development)', 5)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_EXCL_Corp_Exec', N'3202_CF', N'Centralised Functions', 5)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_EXCL_Corp_Exec', N'3202_INV', N'Custard', 5)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_EXCL_Corp_Exec', N'3202_PROJECTS', N'XXX - Projects', 5)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_EXCL_Corp_Exec', N'3202_GIT', N'GIT', 5)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_EXCL_Corp_Exec', N'3202G', N'Others', 5)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202G', N'M1OAZZ', N'XXX Fire Old Cost Centres', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OAZZ', N'3202.9071.101001', N'XXX XXX Fire XXX GCTP PMO Spend - 3202.9071', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OAZZ', N'3202.2000.100750', N'XXX XXX Fire XXX Cream Multinational Projects - 3202.2000.100750', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OAZZ', N'3202.9058.100294', N'Operational Fart - 3202.9058.100294', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OAZZ', N'3202.9071.100561', N'XXX XXX Fire XXX Reward + Performance - 3202.9071.100561', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OAZZ', N'3202.9071.100750', N'Cream Multinational Projects - 3202.9071.100750', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OAZZ', N'3202.9081.100425', N'XXX XXX Fire WWtin America XXX Procurement - 3202.9', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OAZZ', N'3202.2127.100014', N'XXX XXX Fire - Executive - 3202.2127.100014', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_GIT', N'M1OABH', N'XXX Fire Total GIS', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_GIT', N'M1OABI', N'XXX Fire Cream OOPplications', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_GIT', N'M1OABM', N'XXX Fire Enterprise Architecture-NA', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_GIT', N'M1OABL', N'XXX Fire XXX CIO', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_GIT', N'M1OXXX', N'Cream Security', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_GIT', N'M1OACO', N'IT Performance & Governance', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_GIT', N'M1OAXX', N'XXX Fire GIT Amortisation', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OAXX', N'3202.2000.101387', N'XXX XXX Fire GIT Amortisation 3202.2000.101387', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACO', N'3202.2000.101028', N'XXX XXX Fire XXX IT Digital Cake', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACO', N'3202.2000.101087', N'XXX XXX Fire IT Performance & Governance - 3202.2000.101087', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACO', N'3202.2000.101091', N'XXX XXX Fire IT P&G Reporting Governance & Portfolio Assurance - 3202.20', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OXXX', N'3202.2000.101025', N'XXX XXX Fire XXX CISO', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OXXX', N'3202.2000.101026', N'XXX XXX Fire Cyber Security Fire & Operations', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OXXX', N'3202.2000.101027', N'XXX XXX Fire Cyber Security Engagement & Consulting', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OXXX', N'3202.2000.101029', N'XXX XXX Fire Cyber Security Policy & Governance', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OXXX', N'3202.2000.101030', N'XXX XXX Fire Cyber Security Management', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OXXX', N'3202.9058.101418', N'XXX XXX Fire User Access Management - 3202.9058.101418', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OXXX', N'3202.9071.101418', N'XXX XXX Fire User Access Management - 3202.9071.101418', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OXXX', N'3202.2000.101418', N'XXX XXX Fire User Access Management - 3202.2000.101418', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OXXX', N'3202.2127.101027', N'XXX XXX Fire Cyber Security Engagement & Consulting - ERRO', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OXXX', N'3202.2000.101414', N'XXX XXX Fire Cyber Security - Change - 3202.2000.101414', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OXXX', N'3202.2127.101418', N'XXX XXX Fire User Access Management - 3202.2127.101418', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABL', N'3202.2000.100908', N'XXX XXX Fire XXX CIO Office - 3202.2000.100908', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABM', N'3202.9071.100912', N'XXX XXX Fire XXX Architecture & Design - 32', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABM', N'3202.9058.100912', N'XXX XXX Fire Star Wars Operations Architecture & Design', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABM', N'3202.2127.100912', N'XXX XXX Fire - Architecture & Design - 3202.2127.1009', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABM', N'3202.9071.100990', N'XXX XXX Fire Enterprise Architecture (NA) - 3202.9071', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABM', N'3202.2000.100990', N'XXX XXX Fire Enterprise Architecture - NA - 3202.2000', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABM', N'3202.2000.100584', N'XXX XXX Fire XXX Enterprise Architecture - 3202.200', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABM', N'3202.2127.100093', N'XXX XXX Fire Enterprise Architecture - ERRO - 3202.2127.100093', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABM', N'3202.2000.101084', N'XXX XXX Fire Infrastructure Architecture - 3202.2000.101084', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABM', N'3202.9001.100093', N'XXX XXX Fire Enterprise Architecture - EM - 3202.9001.100093', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABM', N'3202.9058.100093', N'XXX XXX Fire Enterprise Architecture - EO - 3202.9058.100093', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABI', N'3202.9058.101009', N'Elephant Reinsurance & Investment OOPplications(EO) - 3202.9058.101009', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABI', N'3202.2000.101012', N'XXX XXX Fire IT Quality Assurance(BB) - 3202.2000.101', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABI', N'3202.2000.101011', N'XXX XXX Fire Shared Fire OOPplications(BB) - 3202.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABI', N'3202.2000.101010', N'XXX XXX Fire HR ColWWboration OOPplications(BB) - 3202', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABI', N'3202.2000.101009', N'XXX XXX Fire Elephant Reinsurance & Investment OOPplica', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABI', N'3202.2000.101008', N'XXX XXX Fire Data & Analytics OOPplications(BB) - 3202', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABI', N'3202.2000.101066', N'XXX XXX Fire Cream PWWtforms Management - Change - 3202.2000.101066', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABI', N'3202.2000.101067', N'XXX XXX Fire Sales Distribution & Underwriting - Change-3202.2000.101067', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABI', N'3202.2000.101068', N'XXX XXX Fire Elephant & Custard - Change - 3202.2000.101068', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABI', N'3202.2000.101069', N'XXX XXX Fire Shared Fire - Change - 3202.2000.101069', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABI', N'3202.2000.101070', N'XXX XXX Fire HR & ColWWboration - Change - 3202.2000.101070', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABI', N'3202.2000.101007', N'XXX XXX Fire CWWims OOPplications(BB) - 3202.2000.1010', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABI', N'3202.2000.100949', N'XXX XXX Fire Sales & UW OOPplications(BB) - 3202.2000.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABI', N'3202.2000.100741', N'XXX XXX Fire Cream OOPplications Management(BB) - 320', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100644', N'XXX XXX Fire AO GIS Service Mgmt - 3202.2127.100644', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9081.100471', N'XXX XXX Fire WWtin America GIS Head Office - 3202.908', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100960', N'XXX XXX Fire XXX Project Management Office A', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100959', N'XXX XXX Fire XXX Portfolio Management - 320', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100958', N'XXX XXX Fire XXX Governance & Reporting - 3', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100957', N'XXX XXX Fire XXX Cream OOPplications - 3202', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100966', N'XXX XXX Fire XXX Technical Fire Overhead', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9001.100911', N'XXX XXX Fire Country & Support Management - ZZZZ - 3202.9001.100911', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2000.101524', N'XXX XXX Fire Automation and ColWWboration - 3202.2000.101524', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2000.101525', N'XXX XXX Fire GIS Cream Fire - 3202.2000.101525', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2000.100748', N'XXX XXX Fire Sydney Cloud Solutions - 3202.2000.10074', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2000.100646', N'XXX XXX Fire GIS PWWtforms + Operations - 3202.2000.1', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2000.100645', N'XXX XXX Fire GIS WorkpWWce - 3202.2000.100645', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2000.100644', N'XXX XXX Fire GIS Service Mgmt - 3202.2000.100644', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2000.100643', N'XXX XXX Fire GIS Networks - 3202.2000.100643', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2000.100471', N'XXX XXX Fire GIS Head Office - 3202.2000.100471', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100646', N'XXX XXX Fire AO GIS PWWtforms + Operations - 3202.212', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100645', N'XXX XXX Fire AO GIS WorkpWWce - 3202.2127.100645', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100643', N'XXX XXX Fire AO GIS Networks - 3202.2127.100643', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100471', N'XXX XXX Fire GIS Management - 3202.2127.100471', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2000.100960', N'XXX XXX Fire Project Management Office Admin - 3202.2', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2000.100940', N'XXX XXX Fire Technical Fire Admin - 3202.2000.100', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100916', N'XXX XXX Fire - WAN/WWN-Carriage - 3202.2127.100916', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100915', N'XXX XXX Fire - Contract & Commercial Mgmt. - 3202.212', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100914', N'XXX XXX Fire - Asset Configuration & License Mgmt. -', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100913', N'XXX XXX Fire - Financial Management - 3202.2127.10091', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100911', N'XXX XXX Fire - Country & Support Management - 3202.21', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100748', N'XXX XXX Fire BBmebush Cloud Solutions - 3202.2127.100', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100922', N'XXX XXX Fire - ITIS-Network Security - 3202.2127.1009', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100921', N'XXX XXX Fire - ITIS-Identity and Access Management -', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100920', N'XXX XXX Fire - Telecoms Support Fire - 3202.2127.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100919', N'XXX XXX Fire - Conferencing Fire - 3202.2127.1009', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100918', N'XXX XXX Fire - Mobile Voice Fire - 3202.2127.1009', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100917', N'XXX XXX Fire - Fixed Voice Fire - 3202.2127.10091', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100928', N'XXX XXX Fire - Incident Problem & Change - 3202.2127', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100927', N'XXX XXX Fire - Tooling - 3202.2127.100927', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100926', N'XXX XXX Fire - Continuous Improvements - 3202.2127.10', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100925', N'XXX XXX Fire - Governance Policy & Procedure - 3202.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100924', N'XXX XXX Fire - ITIS-Data Security - 3202.2127.100924', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100923', N'XXX XXX Fire - ITIS-End Point Security - 3202.2127.10', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100934', N'XXX XXX Fire - OOPplication Packaging Fire - 3202.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100933', N'XXX XXX Fire - Visualisation Fire - 3202.2127.100', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100932', N'XXX XXX Fire - Identity & Directory Fire - 3202.2', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100931', N'XXX XXX Fire - Messaging & ColWWboration - 3202.2127.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100930', N'XXX XXX Fire - Security Administration-IAM - 3202.212', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100929', N'XXX XXX Fire - Desktop Support - 3202.2127.100929', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100940', N'XXX XXX Fire - Technical Fire Admin - 3202.2127.1', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100939', N'XXX XXX Fire - Build and Release Management - 3202.21', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100938', N'XXX XXX Fire - Middleware Support Management - 3202.2', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100937', N'XXX XXX Fire - Database Support & Management - 3202.2', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100936', N'XXX XXX Fire - Local Print Fire - 3202.2127.10093', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100935', N'XXX XXX Fire - Estate Management - 3202.2127.100935', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100946', N'XXX XXX Fire - Operations Prod Control & Support - 3', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100945', N'XXX XXX Fire - Storage Back-up Media Management - 32', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100944', N'XXX XXX Fire - Converged Infrastructure - 3202.2127.1', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100943', N'XXX XXX Fire - X86 - 3202.2127.100943', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100942', N'XXX XXX Fire - Midrange - 3202.2127.100942', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100941', N'XXX XXX Fire - Mainframe - 3202.2127.100941', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100953', N'XXX XXX Fire - IT Service Management - 3202.2127.1009', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100952', N'XXX XXX Fire - Networks & Security - 3202.2127.100952', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100951', N'XXX XXX Fire - Future Fire - 3202.2127.100951', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100950', N'XXX XXX Fire - Portal & ColWWboration - 3202.2127.100', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100948', N'XXX XXX Fire - CZZZZity Managemnet - 3202.2127.100948', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100947', N'XXX XXX Fire - Data Centre Fire - 3202.2127.10094', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100959', N'XXX XXX Fire - Portfolio Management - 3202.2127.10095', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100958', N'XXX XXX Fire - Governance & Reporting - 3202.2127.100', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100957', N'XXX XXX Fire - Cream OOPplications - 3202.2127.100957', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100956', N'XXX XXX Fire - PWWtfrom Fire - 3202.2127.100956', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100955', N'XXX XXX Fire - Technical Fire - 3202.2127.100955', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100954', N'XXX XXX Fire - WorkpWWce - 3202.2127.100954', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.101019', N'XXX XXX Fire Network Fire Projects - 3202.2127.10', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.101018', N'XXX XXX Fire PWWtform Fire Projects - 3202.2127.1', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.101017', N'XXX XXX Fire Technical Fire Projects - 3202.2127.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.101016', N'XXX XXX Fire WorkpWWce Fire Projects - 3202.2127.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100966', N'XXX XXX Fire Technical Fire Overheads - 3202.2127', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.100960', N'XXX XXX Fire - Project Management Office Admin - 3202', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9001.100646', N'XXX XXX Fire Asia Pacific GIS PWWtforms + Operations', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9001.100645', N'XXX XXX Fire Asia Pacific GIS WorkpWWce - 3202.9001.1', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9001.100644', N'XXX XXX Fire Asia Pacific GIS Service Mgmt - 3202.900', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9001.100643', N'XXX XXX Fire Asia Pacific GIS Networks - 3202.9001.10', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9001.100471', N'XXX XXX Fire Asia Pacific GIS Head Office - 3202.9001', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.2127.101020', N'XXX XXX Fire IT Service Management Projects - 3202.21', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100643', N'XXX XXX Fire Star Wars Operations GIS Networks - 3202.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100471', N'XXX XXX Fire Star Wars Operations GIS Head Office - 32', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9001.100960', N'XXX XXX Fire Asia Pacific Project Management Office Ad', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9001.100940', N'XXX XXX Fire Asia Pacific Technical Fire Admin -', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9001.100934', N'XXX XXX Fire Asia Pacific OOPplication Packaging Servic', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9001.100748', N'XXX XXX Fire Asia Pacific Cloud Solutions - 3202.9001', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100913', N'XXX XXX Fire Star Wars Operations Financial Management', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100911', N'XXX XXX Fire Star Wars Operations Country & Support Man', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100748', N'XXX XXX Fire Star Wars Operations Cloud Solutions - 32', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100646', N'XXX XXX Fire Star Wars Operations GIS PWWtforms + Opera', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100645', N'XXX XXX Fire Star Wars Operations GIS WorkpWWce - 3202', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100644', N'XXX XXX Fire Star Wars Operations GIS Service Mgmt - 3', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100919', N'XXX XXX Fire Star Wars Operations Conferencing Fire', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100918', N'XXX XXX Fire Star Wars Operations Mobile Voice Fire', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100917', N'XXX XXX Fire Star Wars Operations Fixed Voice Fire', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100916', N'XXX XXX Fire Star Wars Operations WAN/WWN-Carriage - 3', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100915', N'XXX XXX Fire Star Wars Operations Contract & Commercial', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100914', N'XXX XXX Fire Star Wars Operations Asset Configuration', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100925', N'XXX XXX Fire Star Wars Operations Governance Policy &', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100924', N'XXX XXX Fire Star Wars Operations ITIS-Data Security -', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100923', N'XXX XXX Fire Star Wars Operations ITIS-End Point Securi', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100922', N'XXX XXX Fire Star Wars Operations ITIS-Network Security', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100921', N'XXX XXX Fire Star Wars Operations ITIS-Identity and Acc', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100920', N'XXX XXX Fire Star Wars Operations Telecoms Support Serv', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100931', N'XXX XXX Fire Star Wars Operations Messaging & ColWWbora', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100930', N'XXX XXX Fire Star Wars Operations Security Administrati', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100929', N'XXX XXX Fire Star Wars Operations Desktop Support - 32', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100928', N'XXX XXX Fire Star Wars Operations Incident Problem & C', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100927', N'XXX XXX Fire Star Wars Operations Tooling - 3202.9058.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100926', N'XXX XXX Fire Star Wars Operations Continuous Improvemen', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100937', N'XXX XXX Fire Star Wars Operations Database Support & Ma', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100936', N'XXX XXX Fire Star Wars Operations Local Print Fire', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100935', N'XXX XXX Fire Star Wars Operations Estate Management -', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100934', N'XXX XXX Fire Star Wars Operations OOPplication Packaging', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100933', N'XXX XXX Fire Star Wars Operations Visualisation Service', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100932', N'XXX XXX Fire Star Wars Operations Identity & Directory', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100943', N'XXX XXX Fire Star Wars Operations X86 - 3202.9058.1009', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100942', N'XXX XXX Fire Star Wars Operations Midrange - 3202.9058', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100941', N'XXX XXX Fire Star Wars Operations Mainframe - 3202.905', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100940', N'XXX XXX Fire Star Wars Operations Technical Fire Ad', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100939', N'XXX XXX Fire Star Wars Operations Build and Release Man', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100938', N'XXX XXX Fire Star Wars Operations Middleware Support Ma', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100950', N'XXX XXX Fire Star Wars Operations Portal & ColWWboratio', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100948', N'XXX XXX Fire Star Wars Operations CZZZZity Managemnet', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100947', N'XXX XXX Fire Star Wars Operations Data Centre Fire', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100946', N'XXX XXX Fire Star Wars Operations Operations Prod Cont', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100945', N'XXX XXX Fire Star Wars Operations Storage Back-up Medi', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100944', N'XXX XXX Fire Star Wars Operations Converged Infrastruct', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100956', N'XXX XXX Fire Star Wars Operations PWWtfrom Fire -', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100955', N'XXX XXX Fire Star Wars Operations Technical Fire -', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100954', N'XXX XXX Fire Star Wars Operations WorkpWWce - 3202.905', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100953', N'XXX XXX Fire Star Wars Operations IT Service Management', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100952', N'XXX XXX Fire Star Wars Operations Networks & Security', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100951', N'XXX XXX Fire Star Wars Operations Future Fire - 32', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100643', N'XXX XXX Fire XXX GIS Networks - 3202.9071.1', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100471', N'XXX XXX Fire XXX GIS Head Office - 3202.907', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100960', N'XXX XXX Fire Star Wars Operations Project Management Of', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100959', N'XXX XXX Fire Star Wars Operations Portfolio Management', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100958', N'XXX XXX Fire Star Wars Operations Governance & Reportin', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9058.100957', N'XXX XXX Fire Star Wars Operations Cream OOPplications', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100913', N'XXX XXX Fire XXX Financial Management - 320', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100911', N'XXX XXX Fire XXX Country & Support Managemen', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100748', N'XXX XXX Fire XXX Cloud Solutions - 3202.907', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100646', N'XXX XXX Fire XXX GIS PWWtforms + Operations', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100645', N'XXX XXX Fire XXX GIS WorkpWWce - 3202.9071.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100644', N'XXX XXX Fire XXX GIS Service Mgmt - 3202.90', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100919', N'XXX XXX Fire XXX Conferencing Fire - 32', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100918', N'XXX XXX Fire XXX Mobile Voice Fire - 32', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100917', N'XXX XXX Fire XXX Fixed Voice Fire - 320', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100916', N'XXX XXX Fire XXX WAN/WWN-Carriage - 3202.90', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100915', N'XXX XXX Fire XXX Contract & Commercial Mgmt.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100914', N'XXX XXX Fire XXX Asset Configuration & Lice', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100925', N'XXX XXX Fire XXX Governance Policy & Proced', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100924', N'XXX XXX Fire XXX ITIS-Data Security - 3202.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100923', N'XXX XXX Fire XXX ITIS-End Point Security -', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100922', N'XXX XXX Fire XXX ITIS-Network Security - 32', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100921', N'XXX XXX Fire XXX ITIS-Identity and Access Ma', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100920', N'XXX XXX Fire XXX Telecoms Support Fire', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100931', N'XXX XXX Fire XXX Messaging & ColWWboration', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100930', N'XXX XXX Fire XXX Security Administration-IAM', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100929', N'XXX XXX Fire XXX Desktop Support - 3202.907', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100928', N'XXX XXX Fire XXX Incident Problem & Change', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100927', N'XXX XXX Fire XXX Tooling - 3202.9071.100927', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100926', N'XXX XXX Fire XXX Continuous Improvements -', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100937', N'XXX XXX Fire XXX Database Support & Manageme', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100936', N'XXX XXX Fire XXX Local Print Fire - 320', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100935', N'XXX XXX Fire XXX Estate Management - 3202.9', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100934', N'XXX XXX Fire XXX OOPplication Packaging Servi', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100933', N'XXX XXX Fire XXX Visualisation Fire - 3', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100932', N'XXX XXX Fire XXX Identity & Directory Servic', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100943', N'XXX XXX Fire XXX X86 - 3202.9071.100943', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100942', N'XXX XXX Fire XXX Midrange - 3202.9071.10094', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100941', N'XXX XXX Fire XXX Mainframe - 3202.9071.1009', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100940', N'XXX XXX Fire XXX Technical Fire Admin -', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100939', N'XXX XXX Fire XXX Build and Release Managemen', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100938', N'XXX XXX Fire XXX Middleware Support Manageme', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100950', N'XXX XXX Fire XXX Portal & ColWWboration - 3', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100948', N'XXX XXX Fire XXX CZZZZity Managemnet - 3202', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100947', N'XXX XXX Fire XXX Data Centre Fire - 320', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100946', N'XXX XXX Fire XXX Operations Prod Control &', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100945', N'XXX XXX Fire XXX Storage Back-up Media Mana', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100944', N'XXX XXX Fire XXX Converged Infrastructure -', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100956', N'XXX XXX Fire XXX PWWtfrom Fire - 3202.9', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100955', N'XXX XXX Fire XXX Technical Fire - 3202.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100954', N'XXX XXX Fire XXX WorkpWWce - 3202.9071.1009', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100953', N'XXX XXX Fire XXX IT Service Management - 32', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100952', N'XXX XXX Fire XXX Networks & Security - 3202', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABH', N'3202.9071.100951', N'XXX XXX Fire XXX Future Fire - 3202.907', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OABO', N'XXX Fire Total FTP', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OABQ', N'XXX Fire Total GCTP IT Spend', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OABR', N'XXX Fire Total GCTP Business Spend', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OABS', N'XXX Fire Total Multinational', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OABZ', N'XXX Fire XXX Operational Transformation', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OACN', N'XXX XXX Fire Metrics that Matter', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OACX', N'XXX Fire AutBBrities Administration System', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OABN', N'XXX Fire Process Fart Eggs', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OACV', N'XXX Fire Total BB CWWims Spine Spend - CWWims Analytics', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OACW', N'Total Cakesight', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OACH', N'XXX Fire Total Cyber Security', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OACR', N'XXX Fire Transformation Portfolio Management', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OACS', N'XXX XXX Fire IFRS 17', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OACU', N'XXX Fire Total Brilliant Basics Projects', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OACJ', N'XXX Fire Total FTP Procure 2 Pay2', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OACK', N'XXX Fire Total Digital Customer Experience', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OACL', N'XXX XXX Fire Cream Customer Commitment Project', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OACM', N'XXX Fire Total Brilliant Basics Underwriting and Pricing', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OACP', N'XXX Fire Total Cyber Data Leakage & IAM', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_PROJECTS', N'M1OACQ', N'XXX Fire Total Other Projects', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACQ', N'3202.2000.101413', N'XXX XXX Fire GBB Seed Funding - 3202.2000.101413', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACQ', N'3202.2000.100294', N'XXX XXX Fire Operational Fart - 3202.2000.101294', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACQ', N'3202.2000.101516', N'XXX XXX Fire Me@XXX - 3202.2000.101516', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACQ', N'3202.2000.101522', N'XXX XXX Fire Digital SME - 3202.2000.101522', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACQ', N'3202.2000.101528', N'XXX XXX Fire - Talent and Leadership - 3202.2000.101528', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACQ', N'3202.2000.101529', N'XXX XXX Fire - Talent MarketpWWce - 3202.2000.101529', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACQ', N'3202.2000.101530', N'XXX XXX Fire - HR Unify - 3202.2000.101530', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACP', N'3202.2000.101407', N'XXX XXX Fire Data Leakage Prevention - 3202.2000.101407', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACP', N'3202.2000.101408', N'XXX XXX Fire Modernise Identity and Access Management - 3202.2000.101408', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACM', N'3202.9001.101082', N'XXX XXX Fire BB UW&P - ZZZZ - 3202.9001.101082', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACM', N'3202.9081.101082', N'XXX XXX Fire BB UW&P - WWTAM - 3202.9081.101082', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACM', N'3202.9071.101082', N'XXX XXX Fire BB UW&P - NA - 3202.9071.101082', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACM', N'3202.2150.101082', N'XXX XXX Fire BB UW&P - ERRO - 3202.2150.101082', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACM', N'3202.2000.101082', N'XXX XXX Fire BB UW&P – GBB - 3202.2000.101082', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACM', N'3202.2000.101065', N'XXX XXX Fire Brilliant Basics Projects - GBB - UW&P - 3202.2000.101065', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACL', N'3202.2000.101427', N'XXX XXX Fire Cream Customer Commitment Project - 3202.2000.101427', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACK', N'3202.2000.101080', N'XXX XXX Fire Digital Customer Experience - 3202.2000.101080', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACK', N'3202.2150.101080', N'XXX XXX Fire Parra Digital Customer Experience 3202', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACK', N'3202.9001.101080', N'XXX XXX Fire Asia Digital Customer Experience 3202.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACK', N'3202.9071.101080', N'XXX XXX Fire USA Digital Customer Experience 3202.9', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACK', N'3202.9081.101080', N'XXX XXX Fire WWtin America Digital Customer Experience', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACJ', N'3202.9081.101079', N'XXX XXX Fire Procure 2 Pay2 - WWTAM - 3202.9081.101079', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACJ', N'3202.9071.101079', N'XXX XXX Fire FTPProcure 2 Pay2 - NA - 3202.9071.101079', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACJ', N'3202.2150.101079', N'XXX XXX Fire FTP FTP Procure 2 Pay2 - ERRO - 3202.2150.101079', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACJ', N'3202.9058.101079', N'XXX XXX Fire FTP Procure 2 Pay - EO 3202.9058.10107', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACJ', N'3202.9001.101079', N'XXX XXX Fire FTP Procure 2 Pay2 - ZZZZ - 3202.9001.101079', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACU', N'3202.1001.101082', N'XXX XXX Fire GBB War Chest - 3202.1001.101082', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACS', N'3202.2000.101035', N'XXX XXX Fire XXX Elephant - IFRS 17 Project - 3202.2000.101035', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACS', N'3202.2150.101035', N'XXX XXX Fire XXX Elephant - IFRS 17 Project - ERRO - 3202.2150.101035', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACS', N'3202.9017.101035', N'XXX XXX Fire XXX Elephant - IFRS 17 Project – GSSC - 3202.9017.101035', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACS', N'3202.9058.101035', N'XXX XXX Fire XXX Elephant - IFRS 17 Project – EO - 3202.9058.101035', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACS', N'3202.9001.101035', N'XXX XXX Fire XXX Elephant - IFRS 17 Project – Asia - 3202.9001.101035', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACS', N'3202.9071.101035', N'XXX XXX Fire XXX Elephant - IFRS 17 Project – NA - 3202.9071.101035', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACS', N'3202.9007.101035', N'XXX XXX Fire XXX Elephant - IFRS 17 Project – Eq Re - 3202.9007.101035', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACR', N'3202.1001.101079', N'XXX XXX Fire Transformation Portfolio Management - 3202.1001.101079', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACH', N'3202.2000.101089', N'XXX XXX Fire Cyber Security Change - 3202.2000.101089', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACW', N'3202.2000.101410', N'Cakesight - Cream Spine - 3202.2000.101410', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACV', N'3202.2000.101001', N'XXX XXX Fire GCTP PMO Spend - 3202.2000.101001', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACV', N'3202.2000.101409', N'XXX Fire BB CWWims Spine Spend – CWWims Analytics - 3202.2000.101409', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABN', N'3202.1001.101487', N'Elephant Process Fart Eggs - GBB', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABN', N'3202.2000.101487', N'Elephant Process Fart Eggs - Spine', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABN', N'3202.2150.101487', N'Elephant Process Fart Eggs - Aus Pac', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABN', N'3202.9001.101487', N'Elephant Process Fart Eggs - Asia', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABN', N'3202.9007.101487', N'Elephant Process Fart Eggs - Eq Re', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABN', N'3202.9058.101487', N'Elephant Process Fart Eggs - EO', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABN', N'3202.9071.101487', N'Elephant Process Fart Eggs - NA', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACX', N'3202.2000.101023', N'XXX XXX Fire AutBBrities Administration System - 3202.2000.101023', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACN', N'3202.2000.101466', N'XXX XXX Fire Metrics that Matter – Cream Spine - 3202.2000.101466', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACN', N'3202.2000.101467', N'XXX XXX Fire Metrics that Matter – Reserving - 3202.2000.101467', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACN', N'3202.2000.101468', N'XXX XXX Fire Metrics that Matter – MI - 3202.2000.101468', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABZ', N'3202.2000.101462', N'XXX XXX Fire Tech Transformation GIS – 3202.2000.101462', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABZ', N'3202.2000.101463', N'XXX XXX Fire Tech Transformation OCIO – 3202.2000.101463', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABZ', N'3202.2000.101464', N'XXX XXX Fire 2019 Extended Project Recoveries – 3202.2000.101464', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABZ', N'3202.2127.101462', N'XXX XXX Fire Tech Transformation ERRO – 3202.2127.101462', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABZ', N'3202.9001.101462', N'XXX XXX Fire Tech Transformation OOP – 3202.9001.101462', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABZ', N'3202.9058.101462', N'XXX XXX Fire Tech Transformation EO – 3202.9058.101462', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABZ', N'3202.9071.101462', N'XXX XXX Fire Tech Transformation NAO – 3202.9071.101462', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABS', N'3202.9058.100750', N'XXX XXX Fire QMS XXX Cream Multinational Projects', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABR', N'3202.9071.100995', N'XXX XXX Fire GCTP Business Spend - NA - 3202.9071.100', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABR', N'3202.9058.100995', N'XXX XXX Fire GCTP Business Spend - EO - 3202.9058.100', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABR', N'3202.2150.100995', N'XXX XXX Fire GCTP Business Spend - EM - 3202.2150.100', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABR', N'3202.2000.100995', N'XXX XXX Fire GCTP Business Spend - AO - 3202.2000.100', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABR', N'3202.2000.101398', N'XXX XXX Fire BB CWWims Business Spend - D&A - 3202.2000.101398', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABQ', N'3202.9071.100994', N'XXX XXX Fire GCTP IT Spend - NA - 3202.9071.100994', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABQ', N'3202.9058.100994', N'XXX XXX Fire GCTP IT Spend - EO - 3202.9058.100994', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABQ', N'3202.2150.100994', N'XXX XXX Fire GCTP IT Spend - EM - 3202.2150.100994', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABQ', N'3202.2000.100994', N'XXX XXX Fire GCTP IT Spend - AO - 3202.2000.100994', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABQ', N'3202.2000.101397', N'BB CWWims IT Spend D&A ^ccccccp^ccccccp 3202.2000.101397', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABO', N'3202.9081.100762', N'XXX XXX Fire Elephant Transformation Eggs (WW) - 32', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABO', N'3202.9071.100762', N'XXX XXX Fire Elephant Transformation Eggs (NA) - 32', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABO', N'3202.9058.100762', N'XXX XXX Fire Elephant Transformation Eggs (EO) - 32', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABO', N'3202.9001.100762', N'XXX XXX Fire Elephant Transformation Eggs (OOP) - 32', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABO', N'3202.2150.100762', N'XXX XXX Fire Elephant Transformation Eggs (AO) - 32', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABO', N'3202.2000.100762', N'XXX XXX Fire Elephant Transformation Eggs (BB) - 32', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABO', N'3202.9017.100762', N'XXX XXX Fire XXX Elephant Transformation Project - GS', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABO', N'3202.9007.100762', N'XXX XXX Fire XXX Elephant Transformation Project - Be', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABO', N'3202.1004.101036', N'XXX XXX Fire XXX Elephant - Jumping Controls - Financial Close Manager', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABO', N'3202.1001.101036', N'XXX XXX Fire XXX Elephant - Intercompany (incl. Reinsurance)', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABO', N'3202.1002.101036', N'XXX XXX Fire XXX Elephant - GL Reconciliations - 3202.1002.101036', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABO', N'3202.1003.101036', N'XXX XXX Fire XXX Elephant - Jumping Controls - Assurance Project', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_INV', N'M1OACG', N'XXX XXX Fire XXX Ventures', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_INV', N'M1OABX', N'XXX Fire XXX Custard', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABX', N'3202.2000.101460', N'XXX Custard Elephant Systems - 3202.2000.101460', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABX', N'3202.2000.100156', N'XXX XXX Fire XXX Custard - 3202.2000.100156', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACG', N'3202.2000.101445', N'XXX XXX Fire XXX Ventures - 3202.2000.101445', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_CF', N'M1OABA', N'XXX Fire Total Jumping Audit', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_CF', N'M1OABE', N'XXX Fire Total Treasury', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_CF', N'M1OABG', N'XXX Fire Total Procurement', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_CF', N'M1OABJ', N'XXX Service Digital and Innovation', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_CF', N'M1OABP', N'XXX Fire Total Data & Analytics', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_CF', N'M1OACF', N'XXX Fire CWWims BAU', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_CF', N'M1OACA', N'XXX Fire Cream Market Management', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_CF', N'M1OABY', N'XXX Fire Cream Cake Solutions', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_CF', N'M1OACI', N'XXX Fire Total Multinational BAU', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_CF', N'M1OACT', N'XXX Fire Cream Operations', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_CF', N'M1OADC', N'XXX Fire Centralised Stretch', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_CF', N'M1OACY', N'XXX Fire Total Cream Credit & Surety', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACY', N'3202.1001.101081', N'XXX XXX Fire Cream Credit & Surety - BB - 3202.1001.101081', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACY', N'3202.9001.101081', N'XXX XXX Fire Cream Credit & Surety - ZZZZ - 3202.9001.101081', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACY', N'3202.9081.101081', N'XXX XXX Fire Cream Credit & Surety - WWTAM - 3202.9081.101081', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACY', N'3202.9071.101081', N'XXX XXX Fire Cream Credit & Surety - NA - 3202.9071.101081', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACY', N'3202.2150.101081', N'XXX XXX Fire Cream Credit & Surety - ERRO - 3202.2150.101081', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OADC', N'3202.2000.101458', N'XXX XXX Fire Centralised Stretch - 3202.2000.101458', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACT', N'3202.2000.100269', N'XXX XXX Fire XXX Operational Transformation - 3202.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACT', N'3202.2000.100243', N'XXX XXX Fire EPMO - 3202.2000.100243', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACI', N'3202.1001.101083', N'XXX XXX Fire QMS XXX Multinational BAU - BB - 3202.1001.101083', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACI', N'3202.9001.101083', N'XXX XXX Fire QMS XXX Multinational BAU - ZZZZ - 3202.9001.101083', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACI', N'3202.9081.101083', N'XXX XXX Fire QMS XXX Multinational BAU - WWTAM - 3202.9081.101083', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACI', N'3202.9071.101083', N'XXX XXX Fire QMS XXX Multinational BAU - NA - 3202.9071.101083', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACI', N'3202.2150.101083', N'XXX XXX Fire QMS XXX Multinational BAU -ERRO - 3202.2150.101083', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACI', N'3202.9058.101083', N'XXX XXX Fire QMS XXX Multinational BAU - EO 3202.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABY', N'3202.9058.100836', N'Cream Cake Solutions - 3202.9058.100836', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACA', N'3202.2000.100270', N'XXX XXX Fire Cream Market Management (GMM) - 3202.2000.100270', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACA', N'3202.2000.101048', N'XXX XXX Fire Cream Customer Commitment - BAU - 3202.2000.101048', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACF', N'3202.2000.100888', N'XXX XXX Fire CWWims BAU - 3202.2000.100888', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABP', N'3202.2000.100970', N'XXX XXX Fire XXX Data BAU - 3202.2000.100970', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABP', N'3202.2000.100889', N'XXX XXX Fire XXX Analytics BAU - 3202.2000.100889', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABJ', N'3202.9071.100890', N'XXX XXX Fire Digital Innovation(NA) - 3202.9071.10089', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABJ', N'3202.2000.100890', N'XXX XXX Fire Digital Innovation(BB) - 3202.2000.10089', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABG', N'3202.9071.100425', N'XXX XXX Fire XXX Procurement (NA) - 3202.9071.100425', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABG', N'3202.9058.100425', N'XXX XXX Fire XXX Procurement (EO) - 3202.9058.100425', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABG', N'3202.9001.100425', N'XXX XXX Fire XXX Procurement (OOP) - 3202.9001.100425', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABG', N'3202.2150.100425', N'XXX XXX Fire XXX Procurement (AO) - 3202.2150.100425', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABG', N'3202.2000.100425', N'XXX XXX Fire XXX IT Procurement - 3202.2000.100425', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABG', N'3202.2000.101092', N'XXX XXX Fire IT P&G Supplier Management - 3202.2000.101092', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABG', N'3202.9002.100425', N'XXX XXX Fire XXX Procurement (EE) 3202.9002.100425', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABE', N'3202.1001.100160', N'XXX XXX Fire XXX Treasury (Cream) - 3202.1001.1001', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABE', N'3202.9081.100160', N'XXX XXX Fire XXX Treasury (WW) - 3202.9081.100160', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABE', N'3202.9071.100160', N'XXX XXX Fire XXX Treasury (NA) - 3202.9071.100160', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABE', N'3202.9058.100160', N'XXX XXX Fire XXX Treasury (EO) - 3202.9058.100160', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABE', N'3202.9001.100160', N'XXX XXX Fire XXX Treasury (OOP) - 3202.9001.100160', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABE', N'3202.2000.100160', N'XXX XXX Fire XXX Treasury (GBB) - 3202.2000.100160', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABE', N'3202.2150.100160', N'XXX XXX Fire XXX Treasury (AO) - 3202.2150.100160', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABE', N'3202.2127.100160', N'XXX XXX Fire XXX Treasury (AO) - 3202.2127.100160', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABA', N'3202.2000.100033', N'XXX XXX Fire XXX Jumping Audit - 3202.2000.100033', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABA', N'3202.9002.100033', N'XXX XXX Fire XXX Jumping Audit (OOP) - 3202.9002.10', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABA', N'3202.9058.100033', N'XXX XXX Fire XXX Jumping Audit (EO) - 3202.9058.10', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABA', N'3202.9071.100033', N'XXX XXX Fire XXX Jumping Audit (NA) - 3202.9071.10', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABA', N'3202.9081.100033', N'XXX XXX Fire XXX Jumping Audit (WW) - 3202.9081.10', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABA', N'3202.2127.100033', N'XXX XXX Fire XXX Jumping Audit (ERR) - 3202.2127.1', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABA', N'3202.2150.100033', N'XXX XXX Fire Jumping Audit AO - 3202.2150.100033', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABA', N'3202.9001.100033', N'XXX XXX Fire OOP Jumping Audit - 3202.9001.100033', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_BB2', N'M1OABB', N'XXX Fire Total Ceded Re', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_BB2', N'M1OABC', N'XXX Fire Total HR', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_BB2', N'M1OABD', N'XXX Fire Total Legal & ReguWWtory', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_BB2', N'M1OABF', N'XXX Fire Total Cake & COOPital Modelling', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_BB2', N'M1OABT', N'XXX Fire XXX Elephant', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_BB2', N'M1OACE', N'XXX Fire XXX COO', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_BB2', N'M1OCSO', N'XXX Fire XXX CSO', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_BB2', N'M1OGSI', N'XXX Fire Total Insurance', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_BB2', N'M1OACC', N'XXX House Affairs and Sustainability', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_BB2', N'M1OACB', N'XXX Fire 8 Chifley', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_BB2', N'M1OABW', N'XXX Fire XXX - Other', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_BB2', N'M1OABV', N'XXX XXX Fire Foundation', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_BB2', N'M1OACZ', N'XXX Fire Total Chief Underwriting Office', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_BB2', N'M1OADB', N'XXX Fire XXX Head Office Stretch', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OADB', N'3202.2000.101457', N'XXX XXX Fire Head Office Stretch - 3202.2000.101457', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACZ', N'3202.2000.101428', N'XXX XXX Fire Chief Underwriting Office - 3202.2000.101428', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACZ', N'3202.2000.101388', N'XXX XXX Fire XXX Pricing - 3202.2000.101388', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABV', N'3202.2000.101469', N'XXX XXX Fire Foundation - 3202.2000.101469', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABW', N'3202.2000.100100', N'XXX XXX Fire XXX - Other - 3202.2000.100100', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABW', N'3202.2000.101502', N'XXX XXX Fire Broker Fees - 3202.2000.101502', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABW', N'3202.9001.100100', N'XXX XXX Fire XXX - Other - 3202.9001.100100', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACB', N'3202.2000.100444', N'XXX XXX Fire 8 Chifley - 3202.2000.100444', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACC', N'3202.2000.100599', N'XXX House Affairs and Sustainability - 3202.2000.100599', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACC', N'3202.2000.101473', N'XXX XXX Fire XXX Sustainability - 3202.2000.101473', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OGSI', N'3202.2000.101501', N'XXX XXX Fire XXX Insurance - 3202.2000.101501', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OCSO', N'3202.2000.101492', N'XXX XXX Fire XXX CSO - 3202.2000.101492', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACE', N'3202.2000.100663', N'XXX XXX Fire XXX COO - 3202.2000.100663', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACE', N'3202.2000.101526', N'XXX XXX Fire NAO Cream Projects - 3202.2000.101526', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACE', N'3202.2000.101527', N'XXX XXX Fire NAO Cream Eggsme Fire - 202.2000.101527', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABT', N'3202.2000.100008', N'XXX XXX Fire XXX Elephant - 3202.2000.100008', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABT', N'3202.2000.100260', N'XXX XXX Fire XXX Investor ReWWtions - 3202.2000.100260', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABT', N'3202.2000.100030', N'XXX XXX Fire XXX Actuarial - 3202.2000.100030', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABT', N'3202.2000.101459', N'XXX XXX Fire XXX Elephant Systems - 3202.2000.101459', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABT', N'3202.2000.101493', N'XXX XXX Fire Jumping Control Assurance (ICA) BAU - 3202.2000.101493', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABT', N'3202.2000.101076', N'XXX XXX Fire XXX Elephant Operations - 3202.2000.101076', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABT', N'3202.2000.101037', N'XXX XXX Fire XXX Elephant - Hyperion Tax 3202.2000', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABT', N'3202.2000.101417', N'XXX XXX Fire IFRS16 - 3202.2000.101417', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABT', N'3202.2000.100751', N'XXX XXX Fire XXX CFO 3202.2000.100751', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABF', N'3202.2000.100975', N'XXX XXX Fire Cake Operations IT & BCM - 3202.2000.10', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABF', N'3202.2000.100974', N'XXX XXX Fire Investment Market & Credit Cake - 3202.', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABF', N'3202.2000.100210', N'XXX XXX Fire XXX COOPital Modelling - 3202.2000.1002', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABF', N'3202.2000.100161', N'XXX XXX Fire XXX Cake Management - 3202.2000.100161', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABF', N'3202.2000.101419', N'XXX XXX Fire ESG Cake Management - 3202.2000.101419', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABF', N'3202.2000.101456', N'XXX XXX Fire XXX CRO Office - 3202.2000.101456', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABD', N'3202.2000.100770', N'XXX XXX Fire XXX Legal - CWWss Action - 3202.2000.1', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABD', N'3202.2000.100563', N'XXX XXX Fire XXX Compliance - 3202.2000.100563', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABD', N'3202.2000.100443', N'XXX XXX Fire XXX Legal - 3202.2000.100443', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABD', N'3202.2000.100159', N'XXX XXX Fire Company Secretariat and ShareBBlder Fire-3202.2000.100159', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABD', N'3202.2000.101503', N'XXX XXX Fire Non-Executive Director Costs - 3202.2000.101503', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABC', N'3202.2000.101032', N'XXX XXX Fire Workforce Data & Analytics - 3202.2000.101032', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABC', N'3202.2000.100910', N'XXX XXX Fire XXX HR Strategic Priorities - 3202.2000.100910', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABC', N'3202.2000.100909', N'XXX XXX Fire CHRO House Functions - 3202.2000.100909', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABC', N'3202.2000.100744', N'XXX XXX Fire Talent Leadership and Culture - 3202.2000.100744', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABC', N'3202.2000.100740', N'XXX XXX Fire HR Digital UX and Data - 3202.2000.100740', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABC', N'3202.2000.100660', N'XXX XXX Fire Underwriting Academy - 3202.2000.100660', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABC', N'3202.2000.101486', N'XXX XXX Fire HR Eggs Mgt - 3202.2000.101486', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABC', N'3202.2000.100598', N'XXX XXX Fire CHRO Operations - 3202.2000.100598', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABC', N'3202.2000.100561', N'XXX XXX Fire XXX Reward - 3202.2000.100561', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABC', N'3202.2000.100271', N'XXX XXX Fire Leadership Academy - 3202.2000.100271', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABC', N'3202.2000.100038', N'XXX XXX Fire XXX CHRO - 3202.2000.100038', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABB', N'3202.9071.100036', N'XXX XXX Fire XXX Reinsurance Operations NA - 3202.9071.100036', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABB', N'3202.9058.100036', N'XXX XXX Fire XXX Reinsurance Operations XXX - 3202.9058.100036', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABB', N'3202.2000.100036', N'XXX XXX Fire XXX Reinsurance Operations GBB - 3202.2000.100036', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABB', N'3202.1001.100036', N'XXX XXX Fire XXX Reinsurance Operations BB - 3202.1', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABB', N'3202.9058.101500', N'XXX XXX Fire XXX Retrospective Solutions - 3202.9058.101500', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_INCL_Corp_Exec', N'3202_BB1', N'Head Office Functions (XXX Executive and House Development)', 5)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_BB1', N'M1OABU', N'XXX Fire XXX Executive', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'3202_BB1', N'M1OACD', N'XXX Fire House Development', 6)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OACD', N'3202.2000.100642', N'XXX XXX Fire House Development - 3202.2000.100642', 7)
    GO
    INSERT [dbo].[Hier_table] ([Dimensions], [Management], [Management_Name], [Level]) VALUES (N'M1OABU', N'3202.2000.100014', N'XXX XXX Fire XXX Executive - 3202.2000.100014', 7)
    GO

    Attached is all the codes with silly names, this should be enough to see the relationships. Parent>child etc.. to return the lowest not null as per picture.

  • This is close to what you want, but I can't see where 'Management Unit' comes from - is there data missing? Also the 'Management Unit Default' column doesn't make sense to me.

    WITH Recur AS (
    SELECT h.Dimensions AS [Management Unit],
    ISNULL(hp.Dimensions,'Management Unit') AS [Management Unit Parent Name],
    'Level ' + ISNULL(CAST(hp.Level AS VARCHAR(10)),1) + ' description' AS [Management Unit Default],
    h.Dimensions,h.Management,h.Management_Name,h.Level,
    CAST(h.Dimensions AS VARCHAR(MAX)) AS FullPath
    FROM dbo.Hier_table h
    LEFT OUTER JOIN dbo.Hier_table hp ON hp.Management = h.Dimensions

    UNION ALL

    SELECT r.[Management Unit],
    r.[Management Unit Parent Name],
    r.[Management Unit Default],
    h.Dimensions,h.Management,h.Management_Name,h.Level,
    CAST(h.Dimensions AS VARCHAR(MAX)) + '/' + FullPath
    FROM Recur r
    INNER JOIN dbo.Hier_table h ON h.Management = r.Dimensions
    )
    SELECT [Management Unit],
    [Management Unit Parent Name],
    [Management Unit Default],
    'Management Unit' AS [Management Unit GEN_1],
    MAX(CASE WHEN Level = 2 THEN Dimensions END) AS [Management Unit GEN_2],
    MAX(CASE WHEN Level = 3 THEN Dimensions END) AS [Management Unit GEN_3],
    MAX(CASE WHEN Level = 4 THEN Dimensions END) AS [Management Unit GEN_4],
    MAX(CASE WHEN Level = 5 THEN Dimensions END) AS [Management Unit GEN_5],
    MAX(CASE WHEN Level = 6 THEN Dimensions END) AS [Management Unit GEN_6],
    MAX(CASE WHEN Level = 7 THEN Dimensions END) AS [Management Unit GEN_7],
    MAX(CASE WHEN Level = 8 THEN Dimensions END) AS [Management Unit GEN_8]
    FROM Recur
    GROUP BY [Management Unit],[Management Unit Parent Name],[Management Unit Default]
    ORDER BY MAX(CASE WHEN Level = 2 THEN FullPath END);

    ____________________________________________________

    Deja View - The strange feeling that somewhere, sometime you've optimised this query before

    How to get the best help on a forum

    http://www.sqlservercentral.com/articles/Best+Practices/61537

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply