SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[p_grid_grpcls_versions_by_model]
    @group_code ais_code_short,
    @brand_code ais_code_short,
    @model varchar(50),
    @version varchar(50) = '%'
AS 

	/*
	[DGE]
	Procedura intoarce lista versiunilor pentru un grup & brand & model
	*/

	select	distinct clsc_version
	from	grpcls_classes 
	where	clsc_group_code = @group_code
	AND		clsc_brand_code = @brand_code
	AND		clsc_model = @model
	AND
			(
				@version = '%' OR clsc_version = @version
			)






GO
