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

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

	select	distinct b.*
	from	grpcls_brands gb
			inner join nm_brands b on brd_brand_code = clsb_brand_code
	where	clsb_group_code = @group_code
	AND		(
				@brand_code = '%' OR clsb_brand_code = @brand_code
			)
GO
