SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE PROCEDURE [dbo].[p_grid_grpcls_classes_classes]
    @group_code ais_code_short = '%',
    @class_id	varchar(15) = '%'
AS 

declare @id int 

if @class_id = '%'
	set @id = 0
else
	set @id = convert(int, @class_id)

select	DISTINCT clsc_class_code
from	grpcls_classes
where	clsc_group_code = @group_code
AND		(
			@id = 0 OR clsc_class_id = @id
		)



GO
