SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[p_grid_grpzon_countries_by_group]
    @group_code ais_code_short,
    @country_code ais_code_short = '%'
AS 

	/*
	[DGE]
	Procedura intoarce lista tarilor (cod si label) pentru un grup specificat.
	*/

	select	distinct c.*
	from	grpzon_zones z
			inner join nm_countries c on c.nmctr_country_code = z.zonz_country_code
	where	z.zonz_group_code = @group_code
	AND		(
				@country_code = '%' OR zonz_country_code = @country_code
			)


GO
