Skip to content
Rolf Thunbo edited this page Mar 9, 2015 · 1 revision
CREATE VIEW dbo.AREAGROUP_REPORTINGCOUNTRY
AS
SELECT ROW_NUMBER() OVER(ORDER BY CountryId, GroupId) Id, * 
FROM (
SELECT [LOV_AreaGroupID] as GroupId, null As CountryId, [Name] FROM [dbo].[LOV_AREAGROUP]
UNION ALL
SELECT null As GroupId, [LOV_CountryID] as CountryId, [Name] FROM [dbo].[REPORTINGCOUNTRY]
) a;
Clone this wiki locally