
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[p_find_cli_by_policy_id]
	@id int
AS

	SELECT  act_actor_id,
			act_type_code,
			act_internal_reference,
			act_external_reference,
			adr_name,
			adr_complete_name,
			adr_address1,
			adr_address2,
			adr_address3
	FROM    vw_act_actors_adresses
			INNER JOIN act_clients on cli_actor_id = act_actor_id
			INNER JOIN pol_policies on cli_actor_id = pol_client_id 
	WHERE	pol_policy_id = @id

GO
