Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

I would like to be able to filter results based on resource groups names. Not the long subscriptionid. #32

Open
bbengs75 opened this issue Aug 4, 2016 · 2 comments

Comments

@bbengs75
Copy link

bbengs75 commented Aug 4, 2016

No description provided.

@tdjastrzebski
Copy link
Contributor

tdjastrzebski commented Apr 14, 2017

Just create a new db view containing extracted ResourceGroup and ResourceName

create view dbo.AzureUsageRecordsView
as
select *,
ResourceGroup = case when len(ResourceUri) > 68 then substring(ResourceUri, 68, charindex('/', ResourceUri, 68) - 68) else '' end,
ResourceName = case when len(ResourceUri) > 2 then substring(ResourceUri, len(ResourceUri) - charindex('/', reverse(ResourceUri))+2, charindex('/', reverse(ResourceUri))-1) else '' end
from dbo.AzureUsageRecords

@tdjastrzebski
Copy link
Contributor

tdjastrzebski commented May 26, 2017

resource group names have been added to master branch - use dbo.AzureUsageRecordsView

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants