
/****** Object:  View [dbo].[ApiItemsRegionsView]    Script Date: 13.09.2021 14:29:10 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE VIEW [dbo].[ApiItemsRegionsView] as
	select TwG_GIDNumer ItemId, d.Id RegionId 
	from CDN.TwrGrupy
	JOIN dbo.ApiDictionaries d ON  d.ParentDefId = 31  and  d.NumberValue = TwG_GrONumer
	where TwG_GrONumer in (select TwG_GIDNumer from CDN.TwrGrupy where TwG_GrONumer = 18883)
GO


