SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE PROCEDURE [dbo].[p_grid_md_link_values]
    @link_table_name ais_name, 
    @value ais_code_short = '%'
AS 
    BEGIN
        SELECT  lval_value ,
                lval_l1 ,
                lval_l2 ,
                lval_l3
        FROM    dbo.md_link_values
        WHERE	lval_link_table_name = @link_table_name
        AND		(
				@value = '%' OR lval_value = @value
				)
    END

GO
