SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[p_grid_pr_families_formulas]
    @family_code ais_code_short,
    @formula_code ais_code_short = '%'
AS 

select	*
from	pr_families_formulas
	inner join pr_families on pff_family_code = pf_family_code
where	pff_family_code = @family_code
		and ( @formula_code = '%' or pff_formula_code = @formula_code)
		


GO
