RedList Habitats Tree View

SELECT habitat_type_tree, habitat_unique_id
FROM [EUNIS].[latest].[Habitat_Information] h1 where habitat_category='REDLIST' 
order by CASE 
    WHEN habitat_unique_id LIKE 'REDLIST_BAL_' 
        THEN 'REDLIST_BAL0' + RIGHT(habitat_unique_id, 1)
    ELSE habitat_type_tree
END

No data