SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE procedure [dbo].[p_nm_endorsment_patterns_families_pf_families]
    @act_code ais_code_short,
    @endorsement_pattern_code ais_code_short
as
    select  pf.pf_family_code, pf.pf_l1,pf.pf_l2, pf.pf_l3,  
		  nepf.*
    from pr_families pf
	   left join nm_endorsment_patterns_families nepf on	    nepf.nmeppf_act_code = @act_code
												and nepf.nmeppf_endorsmentpattern_code = @endorsement_pattern_code
												and pf.pf_family_code = nepf.nmeppf_family_code
GO
